Application client troubles

Hey guys,
I'm having some trouble getting my application client to pass a message to my jms queue. My code may be right and my queue maybe setup correctly but the input parameter I use to set the InitialContex keep throwing the exception:
parameter: t3:\\localhost:7001
The code works on a different laptop (that i don't have access to) so i'm thinking the parameter is being entered wrong :(
Exception in thread "Main Thread" javax.naming.InvalidNameException: url does not contain //
     at weblogic.corba.j2ee.naming.NameParser.parseURL(NameParser.java:395)
     at weblogic.corba.j2ee.naming.ORBHelper.parseURL(ORBHelper.java:611)
     at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:503)
     at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:85)
     at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:31)
     at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
     at javax.naming.InitialContext.init(InitialContext.java:223)
     at javax.naming.InitialContext.<init>(InitialContext.java:197)
     at cms.crown.jms.QueueSend.getInitialContext(QueueSend.java:119)
     at cms.crown.jms.QueueSend.main(QueueSend.java:87)
Anyone know what my mistake is ;P
thanks

Sorry, I stopped using the commandline parameter and hardcoded the url. New error...
Exception in thread "Main Thread" javax.naming.NameNotFoundException: Exception in lookup.: `weblogic/examples/jms/exampleQueue' could not be found. [Root exception is weblogic.corba.cos.naming.NamingContextAnyPackage.NotFound: IDL:weblogic/corba/cos/naming/NamingContextAny/NotFound:1.0]
     at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:65)
     at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:230)
     at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:168)
     at javax.naming.InitialContext.lookup(InitialContext.java:351)
     at cms.crown.jms.QueueSend.init(QueueSend.java:47)
     at cms.crown.jms.QueueSend.main(QueueSend.java:93)
Caused by: weblogic.corba.cos.naming.NamingContextAnyPackage.NotFound: IDL:weblogic/corba/cos/naming/NamingContextAny/NotFound:1.0
     at weblogic.corba.cos.naming.NamingContextAnyPackage.NotFoundHelper.read(NotFoundHelper.java:72)
     at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:87)
     at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:208)
     ... 4 more

Similar Messages

  • IO Error while deploying application client jar file ???????

    Hi,
    In my .ear file, one application-client jar(which contains all helper classes which are used in whole application) file is there. While deploying .ear file, all ejb are getting deployed well, while deploying application client jar file(Global.jar file here) it is giving the following message:
    IO Error deploying Global.jar: D:\oracle9ias\oc4j_extended\j2ee\home\applications\trainiumear\Global.jar
    Here is application-client.xml of Global.jar file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application-client_1_2.dtd'>
    <application-client>
    <display-name>TrainiumClientApp</display-name>
    <description>Application description</description>
    </application-client>
    My Environment: Oracle9iAS (9.0.3.0.0), Windows-NT
    Please let me know Why i am getting 'IO Error' , where i may done wrong ?
    Thanks in Advance
    Srinivas

    Srinivas,
    Before we continue, PLEASE tell me if you've looked through the available
    documentation, code samples, "how-to" documents, etc., for OC4J. It
    seems to me that you're mixing things up a bit. I use the "deploy"
    command to deploy my EARs, example (partial):
    java -jar admin.jar ormi://<host> admin <password> -deploy ...
    And my EAR file is not in the "application-deployments" directory
    when I issue that command.
    Perhaps you could also show me the contents of your "application.xml"
    file for this application you are having trouble with.
    But I repeat, please tell me if you have already looked at the
    available documents regarding OC4J!
    Thanks,
    Avi.

  • Application Client to call JSP...

    Hi all,
    I am using Websphere to write EJB codes and JSP pages and print report based on data retrieved from database. Every morning, i need to manually print sales reports and copied it to a network folder. I found it very tedious. I planned to write an application client to automate the task at midnite. I managed to call the session bean using the client but how can I call the jsp page to print the report? Is it possible? Can I save the jsp page to network folder automatically? Thank you for your help.
    Regards,
    Dreon

    Here is some simple code to read from a url
    private String loadPage() throws Exception
              StringWriter      out;
              URL                url;
              URLConnection     conn;
              BufferedReader     reader;
              String               inputString;
              out = new StringWriter();
              if ( logLoads ) System.out.println("Running loadPage, for URL : " + url );
              conn = _url.openConnection();
              conn.connect();
              if (DEBUG) System.out.println(" connected to server...");
              _contentType = conn.getContentType();
              if (DEBUG) System.out.println(" got Content Type : " + conn.getContentType() );
              reader = new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
              if (DEBUG) System.out.println(" Ready to read data..." );
              while (true) {
                   inputString = reader.readLine();
                   int index = inputString.toUpperCase().indexOf("<HTML>");
                   if ( index >= 0 ) {
                        if (DEBUG) System.out.println(" found <HTML> tag in line : '" + inputString + "'");
                        out.write( inputString.substring( index, inputString.length() ).trim() + "\n" );
                        break;
              inputString = reader.readLine().trim();
              while ( inputString != null ) {
                   if ( inputString.length() > 0 )
                        out.write( inputString + "\n" );
                   inputString = reader.readLine();
              if (DEBUG) System.out.println(" finished.");
              return out.toString();
    }

  • Combining single transaction between session bean & application client

    Hi All,
    The following transaction exception was encountered when trying to combine a EmployeeSessionBean.create(Employee) method in an application client:
    Application Client output
    SEVERE: null
    javax.transaction.SystemException: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.UNKNOWN: WARNING: IOP00010002: Unknown user exception thrown by the server - exception: org.eclipse.persistence.exceptions.DatabaseException; message:
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
    Error Code: 0
    Call: INSERT INTO EmployeeDB.Project (ID, NAME) VALUES (?, ?)
    bind => [2 parameters bound]
    Query: InsertObjectQuery(domain.Project@19d2d53) vmcid: OMG minor code: 2 completed: Maybe
    at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:117)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
    ----------END server-side stack trace---------- vmcid: OMG minor code: 2 completed: Maybe
    at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:332)
    at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:184)
    at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:873)
    at com.sun.enterprise.transaction.UserTransactionImpl.commit(UserTransactionImpl.java:208)
    at applicationClient(*applicationClient.java:229*)
    GF 3.1 Server log
    WARNING: A system exception occurred during an invocation on EJB EmployeeSessionBean method public void ejb.EmployeeSessionBean.create(Employee) javax.ejb.EJBException
    Caused by: javax.persistence.TransactionRequiredException
    at ejb.EmployeeSessionBean.create(*EmployeeSessionBean.java:27*)
    SEVERE: RAR5027:Unexpected exception in resource pooling
    java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
    WARNING: RAR7132: Unable to enlist the resource in transaction. Returned resource to pool. Pool name: [ mysqlPool ]
    WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysqlPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
    WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.]
    WARNING: Local Exception Stack:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
    Below is the code snippet of EmployeeSessionBean & client.applicationClient:
    @Stateless
    //@TransactionManagement(TransactionManagementType.BEAN)
    public class EmployeeSessionBean implements EmployeeService {   
        @PersistenceContext(unitName="EmployeeDB-PU")
        private EntityManager manager;
        public void create(Employee employee) {
            manager.persist(employee);  // line 27
    import javax.transaction.UserTransaction;
    public class applicationClient {
    @Resource UserTransaction tx;
    @EJB private static EmployeeService bean;
    try {
        tx.begin();
        Employee employee = new Employee()
            bean.create(employee);
    } finally {
           try {
                 tx.commit();  // line 229
    }How to relinguish transaction on EmployeeSessionBean so that all transaction could take place in applicationClient side only?
    I am trying to apply examples in Pro JPA 2 to a Java EE 6 ManyToMany application.
    Your assistance would be much appreciated.
    Thanks,
    Jack

    Hi r035198x,
    Thank you for some solid advice and would rather JPA take care of all the special cases such as keeping the records unique.
    Below are the changes made as suggested in ( 1 ), ( 2 ), ( 3 ):
    @Entity
    @IdClass(EmployeePK.class)
    @Table(name="EMPLOYEE", catalog="EmployeeDB", schema="")
    public class Employee implements Serializable {
        @Id
        @Column(name="FIRSTNAME")
        private String firstName;
        @Id
        @Column(name="SURNAME")
        private String surName;
        @Id
        @Column(name="DOB")
        @Temporal(TemporalType.DATE)
        private Date dob;
        @ManyToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}, fetch=FetchType.EAGER)
        @JoinTable(name="EMPLOYEE_PROJECT", catalog="EmployeeDB", schema="",
               joinColumns={@JoinColumn(name="FIRSTNAME_ID", referencedColumnName="FIRSTNAME"),
                            @JoinColumn(name="SURNAME_ID", referencedColumnName="SURNAME"),
                            @JoinColumn(name="DOB", referencedColumnName="DOB")},
               inverseJoinColumns={@JoinColumn(name="PROJECT_ID")})
            private Set<Project> projects = new HashSet<Project>();
    @Entity
    @Table(name="PROJECT", catalog="EmployeeDB", schema="")
    public class Project implements Serializable {
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Column(name="ID")
        private int id;
        @ManyToMany(mappedBy="projects", cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}, fetch=FetchType.EAGER)
            @JoinTable(name="EMPLOYEE_PROJECT", catalog="EmployeeDB", schema="",
               joinColumns={@JoinColumn(name="PROJECT_ID", referencedColumnName="PROJECT_ID")},
               inverseJoinColumns={@JoinColumn(name="FIRSTNAME_ID", referencedColumnName="FIRSTNAME"),
                            @JoinColumn(name="SURNAME_ID", referencedColumnName="SURNAME"),
                            @JoinColumn(name="DOB_ID", referencedColumnName="DOB")})
        private Set<Employee> employees = new HashSet<Employee>();
    @Stateless
    public class EmployeeSessionBean implements EmployeeService {
        @PersistenceContext(unitName="EmployeeDB-PU") private EntityManager manager;
        public void create(Employee employee)
            manager.persist(employee);
    public class applicationClient {
        @EJB
        private static EmployeeService bean;
        public static void main(String[] args) {
        Employee employee = new Employee()
        bean.create(employee);   // line 209
    } I have diverged slightly from using simple primary key (EMPLOYEE_ID) to composite key class (FIRSTNAME, SURNAME, DOB) to resemble the actual application.
    Also gone back to using non - XADatasources since I am depending on JTA to do all the hardwork on the server side.
    Unfortunately, we have hit a snag once again with the following exception still:
    Application Client Output
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:432)
    at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:182)
    at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:65)
    Caused by: javax.ejb.EJBException: java.rmi.MarshalException: CORBA MARSHAL 1330446347 Maybe; nested exception is:
    org.omg.CORBA.MARSHAL: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.MARSHAL: WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream vmcid: OMG minor code: 11 completed: Maybe
    Caused by: java.io.StreamCorruptedException: WARNING: ORBIO00013: Stream corrupted
    ----------END server-side stack trace---------- vmcid: OMG minor code: 11 completed: Maybe
    at ejb._EmployeeService_Wrapper.create(ejb/_EmployeeService_Wrapper.java)
    at applicationClient(applicationClient.java:209)
    GF 3.1 Server log
    WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream
    org.omg.CORBA.MARSHAL: WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream vmcid: OMG minor code: 11 completed: Maybe
    Caused by: java.lang.NullPointerException
    WARNING: ORBIO00013: Stream corrupted
    java.io.StreamCorruptedException: WARNING: ORBIO00013: Stream corrupted
    Your valuable input would be very appreciated.
    Thanks,
    Jack

  • EJB 3.0 Application Client threw Remote nested exception

    Hi All,
    I came across the following EJBException message when trying to retrieve an Employee record (entity bean in EJB 3.0) after having successfully added it into EMPLOYEE table using stateless session bean:
    *10/03/2009 8:53:14 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>*
    WARNING: ACC003: Application threw an exception.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.lang.NullPointerException
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.lang.NullPointerException
    at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
    at ejb.__EmployeeRemote_Remote_DynamicStub.findEmployee(ejb/__EmployeeRemote_Remote_DynamicStub.java)
    at ejb._EmployeeRemote_Wrapper.findEmployee(ejb/_EmployeeRemote_Wrapper.java)
    at client.EmployeeApplicationClient.printEmployee(EmployeeApplicationClient.java:608)
    at client.EmployeeApplicationClient.main(EmployeeApplicationClient.java:55)
    Below is the code snippets of EmployeeApplicationClient.java:
    public class EmployeeApplicationClient {
        @EJB
        private static EmployeeRemote employeebean1;
        @EJB
        private static EmployeeRemote employeebean2;
        public EmployeeApplicationClient() {}
        public static void main(String[] args)
            EmployeeApplicationClient employee_application_client = new EmployeeApplicationClient();
            employee_application_client.addEmployee(1, John, Smith);
            employee_application_client.printEmployee(1);
        public void addEmployee(int id, String firstname, String surname)
            try {
                Employee employee1 = new Employee();
                employee1.setID(id);                       
                employee1.setfirstname(firstname);                       
                employee1.setsurname(surname);                       
                employeebean1.createEmployee(employee1);
            catch {.....}
        public void printEmployee(int employee_id)
           Employee employee2 =  employeebean2.findEmployee(employee_id);
           System.out.println("employee Id: " + employeebean2.getId());
           System.out.println("employee firstname: " + employeebean2.getfirstname());
           System.out.println("employee surname: " + employeebean2.getsurname());
    }Using employeebean1/employeebean2 in printEmployee() did not make any difference.
    The error message appears to indicate that I have incorrectly structured these methods.
    The deployment of EmployeeBean was successful and employee1 is in EMPLOYEE table via SQL query.
    I am using JDK1.6.07, Glassfish v2 with MySQL 5.0 and Netbeans 6.1 on Windows XP platform.
    Any assistance would be greatly appreciated.
    Thanks,
    Jack

    Hi Ataraxisme,
    Thank you for responding to this post.
    This is a J2EE Application Client that was created and deployed along as an Netbeans EAR (both Application Client and EJB) project which uses resource injection as opposed to JNDI lookup.
    I am trying to get employeeApplicationClient.java to work the same way as the following travelAgentApplicationClient.java example which has successfully retrieved its record record immediately after adding using resource injection:
    public class TravelAgentClient {
        @EJB
        private static TravelAgentRemote travelagent;
        public TravelAgentClient() {
        public static void main(String[] args) {
            TravelAgentClient client = new TravelAgentClient();
            client.doTravelAgent();
        public void doTravelAgent() {
            try {
                Cabin cabin_1 = new Cabin();
                cabin_1.setId(1);
                cabin_1.setName("Master Suite");
                cabin_1.setDeckLevel(1);
                cabin_1.setShipId(1);
                cabin_1.setBedCount(3);
                travelagent.createCabin(cabin_1);
                Cabin cabin_2 = travelagent.findCabin(1);
                System.out.println(cabin_2.getName());
                System.out.println(cabin_2.getDeckLevel());
                System.out.println(cabin_2.getShipId());
                System.out.println(cabin_2.getBedCount());
             ......Thanks,
    Jack

  • How to run a pure java application client with ear deployed on 9ias

    Hello all,
    We want to run a pure java application client which is packed with target bean in the same ear file. In the application-client.xml we refer to some EJBs.
    We deployed the ear file which contains ejb jar module and application client module to oracle 9ias 904 through enterprise manager on unix. The jndi.properties we used looks like this
    java.naming.factory.initial=com.evermind.server.rmi.ApplciationClientInitialContextFactory
    java.naming.provider.url=opmn:ormi://opmn_host:opmn_port:oc4j_instance_name/application_name
    java.naming.security.principal=test
    java.naming.security.credentials=test
    Is there anybody knows how to run such an application client? Do we need to provide such a jndi.properties or not at all?
    Thanks,
    9ias user

    Refer OpenEJB User - Oracle ADF Essential and TomEE+
    Also refer Bug in tomee 1.5.2. Fixed in 1.6.
    https://issues.apache.org/jira/browse/TOMEE-756

  • Getting the InitialContext in an application client

    I have an application client deployed in my application. When I run the client like this:
    java -jar reconcile-client/reconcile-client.jar
    It is failing with this exception when trying to look up anything through the InitialContext object:
    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
            at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
            at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
            at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at aoc.arkansas.ReconcileClient.main(ReconcileClient.java:26)Is there another way I should be running the client? According to this link I shouldn't have to supply any information to the constructor of the InitialContext object. http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/servjndi011.htm

    You missed the part where it says you have to use "oracle.j2ee.naming.ApplicationClientInitialContextFactory" and that you should see "Configuring an Oracle Initial Context Factory" (http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/servjndi011.htm#CIACBCHB). Follow that link and you'll find you have to pass in a map with the "java.naming.factory.initial" property set to that factory, and with the "java.naming.provider.url" property set up to point to the OC4J server.

  • Application-client.xml - resourceBundle

    Hi..
    I have a problem creating a standalone application client...
    I have crated an application-client.xml file containing ejb-refs to 2 Sessionbeans : Like this ->
    <ejb-ref>
    <ejb-ref-name>bean/AdvisorProxy</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>app.common.proxy.AdvisorProxyHome</home>
    <remote>app.common.proxy.AdvisorProxy</remote>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>bean/AdminProxy</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>app.common.proxy.AdminProxyHome</home>
    <remote>app.common.proxy.AdminProxy</remote>
    </ejb-ref>
    When I try to run my app I get an exception when I try to get my bean through the context :
    java.util.MissingResourceException: Can't find bundle for base name com/evermind/client/assembler/Assembler, locale en_GB
    Is there something else I have to specify anywhere?
    Thanks...
    johan

    This fixed my problem:
    - JNDI initial context factory -
    com.evermind.server.rmi.RMIInitialContextFactory
    - jndi provider url -
    opmn:ormi://servername

  • Env-entry-mapping in orion-application-client not available in JNDI lookup

    I have an application client module in my EAR file that I've configured to auto-start.
    It has a few env-entry defined in it's application-client.xml.
    When I deploy the EAR file to OC4J 10.1.3, the application client module gets started and can access these env-entry properties from its JNDIContext.
    Now, comes the problem. During the deployment process, I edit the Deployment Plan, and change the env-entry property values, and then deploy the application.
    However, the application client module still gets the original values when it does the JNDI lookups of those env-entry names.
    I have checked to see that OC4J creates an orion-application-client.xml during deployment and it shows the env-entry-mapping elements with the updated values.
    Why is the JNDI lookup returning the values from application-client.xml and not the overriden values set in orion-application-client.xml?
    I have tried this on OC4J 10.1.3, as well as 10.1.3.1.0 - got same behavior.
    Is this a bug in OC4J? This seems to work fine with ejb modules, but not application client modules.
    Thanks,
    Kalpak

    Avi!
    Of course, I had tried it before I wrote the question. I put the modified xml file into the application area. After that AS restarts OC4J instance. And then I find my xml without any changes I made! I tried to do the same thing from the AS console. The same!
    Leonid

  • Distributing a Java EE Application Client (Thin Client)

    Hi,
    I'm following the instructions in Section 4 Developing a Java EE Application Client (Thin Client) in Oracle® Fusion Middleware Programming Stand-alone Clients for Oracle WebLogic Server, 11g Release 1 (10.3.1), Part Number E13717-01.
    I packaged the application client in an ear. If I set up my environment using C:\bea10\wlserver_10.3\server\bin\setWLSEnv.cmd. I can extract the application client using a command line like:
    java weblogic.ClientDeployer myear.ear myclient
    I can execute the client using a command line like:
    java weblogic.j2eeclient.Main myclient.jar t3://localhost:7003
    However, I would like to run the application client on a client machine (i.e., a machine without WebLogic installed). I thought I could use one of the wl*client.jar files such wlclient.jar, wlfullclient.jar, etc. I started with wlfullclient.jar.
    If I try to extract the application client with a command line like
    java -classpath wlfullclient.jar weblogic.ClientDeployer myear.ear myclient
    I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/bea/xml/XmlException
    at weblogic.descriptor.BasicDescriptorManager.getMarshallerFactory(BasicDescriptorManager.java:143)
    at weblogic.descriptor.BasicDescriptorManager.getDescriptorFactory(BasicDescriptorManager.java:183)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:320)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
    at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:301)
    at weblogic.ClientDeployer.findAltDDUri(ClientDeployer.java:210)
    at weblogic.ClientDeployer.processClientJar(ClientDeployer.java:107)
    at weblogic.ClientDeployer.processClientJar(ClientDeployer.java:75)
    at weblogic.ClientDeployer.main(ClientDeployer.java:43)
    Caused by: java.lang.ClassNotFoundException: com.bea.xml.XmlException
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 12 more
    Next I tried using the jar previously extracted on the server and tried to run it using:
    java -classpath wlfullclient.jar weblogic.j2eeclient.Main myclient.jar t3://localhost:7003
    I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/j2ee/descriptor/wl/WeblogicApplicationClientBean
    at weblogic.j2eeclient.Main.fillEnvironment(Main.java:326)
    at weblogic.j2eeclient.Main.run(Main.java:185)
    at weblogic.j2eeclient.Main.main(Main.java:924)
    Caused by: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.wl.WeblogicApplicationClientBean
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 3 more
    Is it possible to extract and execute an application client on a machine without WebLogic server? If so, what jars do I need? If not, why not?
    I'm testing using WebLogic 10.3.1 on a Windows XP SP2 machine using JDK 1.6.0_05.
    Thanks in advance,
    Keith

    Hello,
    I tried doing pre-compilation of jsps using the weblogic.appc and getting the below exception.
    Can any one advise the jar file containing the below class file so that I can add in the classpath and try for it.
    java.lang.ClassNotFoundException: com.bea.xml.XmlException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at weblogic.descriptor.BasicDescriptorManager.getMarshallerFactory(BasicDescriptorManager.java:137)
    at weblogic.descriptor.BasicDescriptorManager.getDescriptorFactory(BasicDescriptorManager.java:171)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:303)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoa
    r2.java:788)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.ja
    :409)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorL
    der2.java:759)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java
    68)
    at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:311)
    at weblogic.application.compiler.CompilerCtx.setApplicationDescriptor(CompilerCtx.java:138)
    at weblogic.application.compiler.AppcUtils.setDDs(AppcUtils.java:142)
    at weblogic.application.compiler.flow.DescriptorParsingFlow.compile(DescriptorParsingFlow.java:57)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    at weblogic.application.compiler.EARCompiler.compile(EARCompiler.java:49)
    at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:118)
    at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:43)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    at weblogic.application.compiler.Appc.runBody(Appc.java:181)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.application.compiler.Appc.main(Appc.java:192)
    at weblogic.appc.main(appc.java:14)
    com.bea.xml.XmlException

  • BC4J and OAS with Java Application Client

    Could you show me an example about using the BC4J and OAS with Java Application client.
    The JDeveloper Help is not enough to solve this kind of problem.
    Configuration:
    Jdeveloper 3.1
    OAS 4.0.8.1
    Database 7.3.4
    null

    if you can logon with client tools then that should be an indication that the service account running the CMS IS working! Good news.
    So the problem is likely with the java portion (krb5/bsclogin or java options)
    If the files are in c:\winnt\ (if not copy them there) and perform c:\program files\business objects\javasdk\bin\kinit username
    then enter and password/enter again
    Probably get the same message. To note in your krb5.ini all domain info must be in CAPS (the .com appears to be in lower case)
    kinit works with just the krb5.ini, java SDK and AD (removing BO config and the service account from the picture). Once that works if your java options are specified properly you should be able to login to CMC/infoview.
    also 1 last point. Add udp_preference_limit = 1 to the krb5 lib defaults section
    libdefaults
    default_realm = BD.com
    dns_lookup_kdc = true
    dns_lookup_realm = true
    udp_preference_limit = 1
    Regards,
    Tim

  • J2EE Tutorial - Application Client

    Hi,
    I've been trying to work through the J2EE Tutorial and I've come to a complete standstill at the EJB section. I have a few problems.
    First of all my deployment tool does not have a JNDI Names Tag as shown in the Mapping The Enterprize Beans Section (Chapter 19). How do I do this?
    I am getting the following error when I try to run my J2EE Application Client.
    Caught an unexpected exception!
    java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
    emoteObject.java:229)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at ConverterClient.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:23
    7)
    at com.sun.enterprise.appclient.Main.<init>(Main.java:425)
    at com.sun.enterprise.appclient.Main.main(Main.java:97)
    Caused by: java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
    emoteObject.java:212)
    Finally, can anybody recommend a good tutorial or book as I think the J2EE tutorial is unusually bad.

    http://docs.sun.com/source/819-0079/dgacc.html
    Finally, can anybody recommend a good tutorial or
    book as I think the J2EE tutorial is unusually bad.Search for Mastering EJB by Ed Roman. It should give a better understanding.

  • How can i run application client from the command prompt ?

    Hi,
    I'm new to java & EJB. so can any body tell me the command to run the application client from the command prompt. Here is the code to print hello world:
    /* Remote interface */
    public interface Hello extends javax.ejb.EJBObject
         public String hello() throws      java.rmi.RemoteException;
    /* Home interface */
    public interface HelloHome extends javax.ejb.EJBHome
         Hello create() throws java.rmi.RemoteException, javax.ejb.CreateException;
    /* Stateless session bean class */
    public class HelloBean implements javax.ejb.SessionBean
         private javax.ejb.SessionContext ctx;
         public void ejbCreate(){
              System.out.println("ejbcreate()");
         public void ejbRemove(){
              System.out.println("ejbRemove()");
         public void ejbActivate(){
              System.out.println("ejbActivate()");
         public void ejbPassivate(){
              System.out.println("ejbejbPassivate()");
         public void setSessionContext(javax.ejb.SessionContext ctx){
              this.ctx=ctx;
         public String hello(){
              System.out.println("hello()");
              return "Hello, world!";
    /*Client class */
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Properties;
    public class HelloClient
         public static void main(String[] args) throws Exception{
              Properties props=System.getProperties();
              Context ctx=new InitialContext(props);
              Object obj=ctx.lookup("HelloHome");
              HelloHome home=(HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
              Hello hello=home.create();
              System.out.println(hello.hello());
              hello.remove();
    I have stored .java files in c:\ejb
    I have successfully created the .class files using javac command in the following directory :
    c:\ejb
    I have also created Helloworld.ear file in c:\ejb using sun application server which contains the following files:
    ejb-jar-ic.jar
    app-client-ic.jar
    sun-j2ee-ri.project
    application.xml
    sun-application.xml
    Manifest.mf
    But the problem is that i'm not able to run the HelloWorld.class file successfully from the command prompt. So please suggest me the comand.
    Thanx in advance.
    Best regards,
    Pankaj

    Hi
    You can run this code from the command prompt in the same way as you run any other simple java program. The only thing is you need to set the Home and Local interfaces in the classpath.And obviously if u had deployed the bean in ur app server container, then its all over.
    And one more thing is that u need to set the provider URL in the InitialContext created in the client program.
    Thanks
    Arun B

  • How to run application client of an EJB application?

    Hi,
    My EJB application is deployed on websphere. I have written a small java client program to interact with an EJB which is working fine if I compile and run it in websphere studio environment.
    However I am getting runtime exception when I tried to run it at command line.
    RemoteConn.java
    import java.util.Hashtable;
    import com.deque.HelloJavaHome;
    import com.deque.HelloJava;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.ejb.EJBHome;
    import javax.ejb.EJBObject;
    public class RemoteConn {
    public static void main(String[] ar) throws Exception{
    String name="Paruchuri!!";
    String greeting = "";
    try{
    Hashtable env = new Hashtable();
    //env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ws.naming.util.WsnInitCtxFactory");
    env.put(Context.PROVIDER_URL, "iiop://localhost:2809");
    InitialContext initContext = new InitialContext(env);
    Object obj = initContext.lookup("ejb/HelloJavaHome");
    HelloJavaHome home = (HelloJavaHome) javax.rmi.PortableRemoteObject.narrow(obj, HelloJavaHome.class);
    HelloJava remote = home.create();
    greeting = remote.getGreeting(name);
    catch(Exception e){
    e.printStackTrace();
    System.out.println("Greeting::"+ greeting);
    I have set the application ejb client jar in the class path of client program.
    The exception I am getting at runtime is
    Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.CORBA.iiop.GlobalORBFactory
    at com.ibm.ejs.oa.EJSORBImpl.class$(EJSORBImpl.java:44)
    at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:195)
    at com.ibm.ejs.oa.EJSClientORBImpl.(EJSClientORBImpl.java:93)
    at com.ibm.ejs.oa.EJSClientORBImpl.(EJSClientORBImpl.java:65)
    at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:385)
    at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:284)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:369)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:112)
    at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:422)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:143)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at RemoteConn.main(RemoteConn.java:38)
    Initially I thought I shuold set some jar file of websphere in the classpath of client. But I did not find such a jar containing the above class in websphere studio.
    Basically the error is generated at the below statement at runtime.
    Object obj = initContext.lookup("ejb/HelloJavaHome");
    The only difference I discovered was that the client application has a descriptor file (application-client.xml ) available to it when it ran in websphere studio,. I guess the same META-INF should be provided to client when it runs at command line.
    Right now I am not using any client descriptor file to run the client program. If the above error is due to not supplying META-INF to the client application, how should I make this folder available to client at runtime?
    I greatly appreciate if I could get help ASAP.
    Thanks

    Hey got what is going on. In order to invoke EJB, deployed on WebSpehre App Server, from application client we need to install either WebSphere Application Pluggable Client or WebSphere Thin client on the workstation. Pluggable client is a wrapper to SUN JRE where as Thin Client uses IBM JRE.

  • How to run a application client in jboss?

    Hi guys i'm new to EJB and may have some qns to ask.
    I have create ejb java files, compile and package it as jar. Next i also create the .jsp pages and package it as war. I package the war and jar together with the xml files for deployment. The file works.
    Now i create a java file as an application client along with the application-client.xml file. Next i jar both the class and xml files together.
    Now , how am i going to run the client class file to produce the results since its jar up. I using jboss 4.0 to run the application.
    thanks
    Regards ChongMing

    Your J2SE client code should simply look up the required EJB homes using JNDI, and use the client interface to execute the EJB code. The example interfaces ejb.interfaces.SimpleHome and ejb.interfaces.Simple need to be packaged into the client JAR and placed in the classpath of test.java
    Example:
    import javax.ejb.EJBException;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import ejb.interfaces.SimpleHome;
    import ejb.interfaces.Simple;
    public class test {
        public static void main(String[] args) {
            try {
                 InitialContext ctx = new InitialContext();
                 SimpleHome home = PortableRemoteObject.narrow(ctx.lookup("ejb/Simple"), SimpleHome.class);
                 Simple simple = home.create(); // or findByPrimaryKey(), etc.
                 simple.aMethod();
            } catch (NamingException ne) {
                // unable to look up SimpleHome
            } catch (EJBException ejbe) {
               // generic EJBException, maybe something went wrong with Simple?
            } catch (ClassCastException cce) {
               // SimpleHome was of the wrong type
    }I may have screwed up the JNDI lookup, as I might not be getting the context correctly, but I usually don't call EJB code from the command line. If I'm wrong, the only thing that will change is that ctx will have to be initialized differently. The rest should work the same.
    Brian

Maybe you are looking for

  • How can I run a  purchased Acrobat Pro XI on a new laptop Win 7 with serial number problem?

    Dear Forum I have not used this service before so if there are any protocols please let me know.  I have just bought a new Fujitsu laptop and have been trying to download my Adobe Acrobat XI Pro that I purchased for A$239.00 in 2013.  When entering t

  • Hyperlinks in Panel Not Visible

    I've been working in Indesign CS6 for a couple of months. I have version 8.0 and am running OS 10.7.4. Yesterday, I noticed that my hyperlinks panel was empty although I had created over 100 hyperlinks in that particular file. The hyperlinks were sti

  • Realtek audio setup ?

    when i configured my audio setup for 5.1 configuration my rear speaker doesn't work. I have to choose 7.1 setup to have them to be functional. The problem is that i have 2 more surround speaker on each side that are not present. Driver need a fix. MS

  • Why don't some of my iPhoto events import to Aperture projects?

    In importing my iPhoto 9.1.3 events to Aperture 3.1.2 projects many are missing or garbled or plain do not transfer. Am I doing something wrong? Any advice as to how to correct the problem? I'd appreciate your help.  Sincerely, Gregory T.P.

  • Deploying iTunes 11.0.4 for Windows

    I am having issues prepping iTunes 11.0.4 for deployment via SCCM 2012. Using the iTunes64.exe for 11.0.4 and commandline switches (NO_ASUW=1 NO_BONJOUR=1 BONJOUR_IS_INSTALLED=1 DESKTOP_SHORTCUTS="0" SCHEDULE_ASUW=0 REGSRCH_MEDIA_DEFAULTS=0 IAcceptLi