log4j + client-application
Hello I want to use log4j together with my application. I.e I want all my servlets, jsps, ejbs and clients to share the same logfiles. I've implemented log4j according to the tip the atlassian guy gave (don't remember his name). Put the log4j.jar in orion/lib, add to the orion-application.xml and finally add the log4j.properties (or .xml) in config and add "config" and add the config to your application. So far so good. All my servlets, jsps ejbs are able to invoke log statements. The trouble is that my client which runs as auto-startup is not able to find log4j.xml until orion is fully initialized. So if I make a log statement in the main method of my client log4j will propt an error msg. But if I invoke a delay until orion is initialized and then make my logstatement everything works. I've tried to set the Class Path: attribute in the Manifest of my client ,which in my case looks like ../../config/log4j.xml. But as it turns out the classloader points at the orion directory and not on my clients jar file, in the mainfest specs it says that the Class Path: attribute is relative to the appplications jar file. Which in my case is not true. How do I use log4j with an application-client which is in autostart mode?` regards /Linus
RE: Client application connection.
I had a number of troubles getting this set up, but unfortunately I don't remember what mose of them were. I'm assuming your admin has rmi:login enabled, and disabled="false"? - Geoffrey -Original Message-From: JoseMa [mailto:[EMAIL PROTECTED]]Sent: Tuesday, December 04, 2001 9:35 AMTo: Orion-InterestSubject: Client application connection. Hi, We have created a client application which connect to EJB in Orion Server. For connecting I have a jndi.properties file with the next parametres: java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory java.naming.provider.url=ormi://server/ java.naming.security.principal=admin java.naming.security.credentials=123 Both HOME_ORION/application-deployments//principals.xml and HOME_ORION/config/principals.xml have defined the user admin. When I executed the client application I look the next exception: Message:Invalid username/password for (admin) Could help me anybody? Thanks. _This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visithttp://www.messagelabs.com/stats.asp _ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp
Client application connection.
Hi, We have created a client application which connect to EJB in Orion Server. For connecting I have a jndi.properties file with the next parametres: java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory java.naming.provider.url=ormi://server/ java.naming.security.principal=admin java.naming.security.credentials=123 Both HOME_ORION/application-deployments//principals.xml and HOME_ORION/config/principals.xml have defined the user admin. When I executed the client application I look the next exception: Message:Invalid username/password for (admin) Could help me anybody? Thanks.
Re:Newbie problem with Client Application
Your assumption about the client is correct. You need to have a META-INF directory and and application.xml and and orion-application.xml in the directory. It will not run without these files. If you look at the demo source for JMSChat you will find some very simple examples.
Newbie problem with Client Application
Hi, I am having problems getting an InitialContext from an ordinary java program running from outside Orion. I have the 'hello-planet' example from orionsupport.com running, and although the Hello bean works as expected when accessed from the servlet, I cannot seem to get to from outside Orion. I think I am trying to run what the specs call a 'client application'. Now the specs seem to imply that a client application needs some kind of minimal EJB container of its own, but I don't see mention of it anywhere else - either in the Orion documentation or on any of the help resources. What I did find on the orionsupport seems to imply that it should be much simpler. I tried user that code (it and the error it generates is below), but obviously it's not working for me. So, I'm wondering if anyone can point me in the right direction here. Thanks in advance, Ross -error Cant initialz JNDI context: javax.naming.NamingException: META-INF/application-client.xml resource not found (see J2EE spec, application-client chapter for requirements and format of the file) relevant code- Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory"); ht.put(Context.PROVIDER_URL, "ormi://localhost:6/hello-planet"); ht.put(Context.SECURITY_PRINCIPAL, "admin"); ht.put(Context.SECURITY_CREDENTIALS, "p@55w0rd"); Context c = null; try { c = new InitialContext( ht ); } catch( Throwable e ) { System.out.println("Cant initialz JNDI context: "+ e.toString() ); }
Re: Creating a client application
If you want to access the ejb which deployed in orion from a client application do the following. create a file named jndi.properties with the following properties in it. java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont extFactory java.naming.provider.url=ormi://localhost/ java.naming.security.principal=admin java.naming.security.credentials=123 make sure that this file should be available in classpath. in your META-INF directory write a application-client.xml which should specify which ejb you want refer. A sample application-client.xml like the following http://java.sun.com/j2ee/dtds/application-client_1_2.dtd";> MyCart Session CartHome Cart Hope this will work for you. - Original Message - From: "Mustafa Cayci" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, June 02, 2001 12:00 PM Subject: Creating a client application > I have been going over the O'Reilly's Enterprise Java > Beans and trying to run an EJB that I deployed in > Orion using an external client. I went into the > Console and I verified that so called application > cabin is deployed. When I try to run the client I am > getting the below exception. Here is my client code > that I have initialContext > > public static Context getInitialContext() throws > javax.naming.NamingException { > Hashtable env = new java.util.Hashtable(); > > env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClie ntInitialContextFactory"); > > env.put(Context.PROVIDER_URL,"ormi://localhost/cabin"); > return new javax.naming.InitialContext(env); > } > > Exception: > > javax.naming.NamingException: Error reading > application-client descriptor: No location specified > and no suitable instance of the type 'Cabin' found for > the ejb-ref Cabin > javax.naming.Context > com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (java.util.Hashtable) > javax.naming.Context > javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) > javax.naming.Context > javax.naming.InitialContext.getDefaultInitCtx() > void > javax.naming.InitialContext.init(java.util.Hashtable) > void > javax.naming.InitialContext.(java.util.Hashtable) > javax.naming.Context > com.titan.cabin.Client_1.getInitialContext() > void > com.titan.cabin.Client_1.main(java.lang.String[]) > > > Any help is appreciated. > > Thanks, > Mustafa > > > __ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ >
Creating a client application
I have been going over the O'Reilly's Enterprise Java Beans and trying to run an EJB that I deployed in Orion using an external client. I went into the Console and I verified that so called application cabin is deployed. When I try to run the client I am getting the below exception. Here is my client code that I have initialContext public static Context getInitialContext() throws javax.naming.NamingException { Hashtable env = new java.util.Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory"); env.put(Context.PROVIDER_URL,"ormi://localhost/cabin"); return new javax.naming.InitialContext(env); } Exception: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'Cabin' found for the ejb-ref Cabin javax.naming.Context com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(java.util.Hashtable) javax.naming.Context javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) javax.naming.Context javax.naming.InitialContext.getDefaultInitCtx() void javax.naming.InitialContext.init(java.util.Hashtable) void javax.naming.InitialContext.(java.util.Hashtable) javax.naming.Context com.titan.cabin.Client_1.getInitialContext() void com.titan.cabin.Client_1.main(java.lang.String[]) Any help is appreciated. Thanks, Mustafa __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
RE: Problems with JNDI lookups of defined inapplication-client.xml from a client application...
Well, if that's the case, then what's the point of putting ejb-ref in to the application-client? The client can just always lookup by absolute name inthe JNDI namespace. And how would an independent client developer possibly know the EJB names deployed in your custom environment? -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Hubbach Sent: Friday, March 16, 2001 8:00 AM To: Orion-Interest Subject: Re: Problems with JNDI lookups of defined in application-client.xml from a client application... Just a sidenote, maybe it's your problem. From page 377 of Enterprise JavaBeans, 2nd Edition (Oreilly): "The ejb-link value must match one of the ejb-name values declared in the same deployment descriptor." That is, it's only valid if you're using an ejb-jar.xml to define multiple beans. Jeff Hubbach. Alex Paransky wrote: > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that ejb/id cannot be > found: > > Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot create references > and use the name specified in to lookup the components? Or > am I missing something? > > Thanks. > -AP_ -- Jeff Hubbach Internet Developer New Media Designs, Inc. www.nmd.com
RE: Problems with JNDI lookups of defined in application-client.xml from a client application...
I tried that before, and got the following exception: Exception in thread "main" javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLContext.java:392) at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51) at javax.naming.InitialContext.lookup(InitialContext.java:350) at client.PersonClient.main(PersonClient.java:25) Is this a bug? -AP_ -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus RydinSent: Friday, March 16, 2001 1:30 AMTo: Orion-InterestSubject: SV: Problems with JNDI lookups of defined in appli cation-client.xml from a client application... Did you try looking up "java:comp/env/ejb/id" ? WR > -Ursprungligt meddelande- > Från: Alex Paransky [mailto:[EMAIL PROTECTED]] > Skickat: den 15 mars 2001 14:11 > Till: Orion-Interest > Ämne: Problems with JNDI lookups of defined in > application-client.xml from a client application... > > > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that > ejb/id cannot be > found: > > Exception in thread "main" > javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot > create references > and use the name specified in to lookup the > components? Or > am I missing something? > > Thanks. > -AP_ > > >
RE: Problems with JNDI lookups of defined inapplication-client.xml from a client application...
You are exactly correct. This IS how it is working in Orion but this does not seem to the correct. Suppose you have an EJB that implements some STANDARD interface already defined, deployed and used by many applications and from many places. You buy a client application from a vendor who has implemented a new GUI to work with this STANDARD interface. The vendor defines application-client.xml and you need to augment it with to point to the actual bean. The vendor DOES NOT know what is the REAL PHYSICAL name of the bean which implemented the STANDARD interface in your environment, so there is no way for the vendor to do a lookup based on "beanName". The client vendor writes his application to lookup on the value in . If this is the way Orion is working, this appears to be somewhat of a serious bug. By the way, when I try to use "java:comp/env" from my client, I get the following exception: Exception in thread "main" javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon text.java:392) at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51) at javax.naming.InitialContext.lookup(InitialContext.java:350) at client.PersonClient.main(PersonClient.java:25) Should I record this as a bug, or does any one have other ideas? Thanks to all that replied -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bruno Baloi Sent: Friday, March 16, 2001 6:54 AM To: Orion-Interest Subject: RE: Problems with JNDI lookups of defined in application-client.xml from a client application... Hia guys, Here is a bit of my experience with this stuff - I found out that if I have a regular Java client it's the ejb-jar.xml's that is being used to lookup the bean name without the comp/env. The comp/env is only to be used by J2ee clients i.e. servlets or JSPs. For the J2EE clients, it is the name that is used in the lookup. It's weird as all hell !! But that how I found out about this. IN other words whatever you are using for the Home's lookup will depend on the type of client you are using. To recap - for Java clients use lookup("beanName") for J2EE clients ("java:comp/env/beanName") Try giving this a try Good Luck -Original Message- From: Magnus Rydin [SMTP:[EMAIL PROTECTED]] Sent: Friday, March 16, 2001 4:30 AM To: Orion-Interest Subject:SV: Problems with JNDI lookups of defined in application-client.xml from a client application... Did you try looking up "java:comp/env/ejb/id" ? WR > -Ursprungligt meddelande- > Från: Alex Paransky [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] > Skickat: den 15 mars 2001 14:11 > Till: Orion-Interest > Ämne: Problems with JNDI lookups of defined in > application-client.xml from a client application... > > > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that > ejb/id cannot be > found: > > Exception in thread "main" > javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot > create references > and use the name specified in to lookup the > components? Or > am I missing something? > > Thanks. > -AP_ > > >
Re: Problems with JNDI lookups of defined in application-client.xml from a client application...
Just a sidenote, maybe it's your problem. From page 377 of Enterprise JavaBeans, 2nd Edition (Oreilly): "The ejb-link value must match one of the ejb-name values declared in the same deployment descriptor." That is, it's only valid if you're using an ejb-jar.xml to define multiple beans. Jeff Hubbach. Alex Paransky wrote: > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that ejb/id cannot be > found: > > Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot create references > and use the name specified in to lookup the components? Or > am I missing something? > > Thanks. > -AP_ -- Jeff Hubbach Internet Developer New Media Designs, Inc. www.nmd.com
RE: Problems with JNDI lookups of defined in application-client.xml from a client application...
Hia guys, Here is a bit of my experience with this stuff - I found out that if I have a regular Java client it's the ejb-jar.xml's that is being used to lookup the bean name without the comp/env. The comp/env is only to be used by J2ee clients i.e. servlets or JSPs. For the J2EE clients, it is the name that is used in the lookup. It's weird as all hell !! But that how I found out about this. IN other words whatever you are using for the Home's lookup will depend on the type of client you are using. To recap - for Java clients use lookup("beanName") for J2EE clients ("java:comp/env/beanName") Try giving this a try Good Luck -Original Message- From: Magnus Rydin [SMTP:[EMAIL PROTECTED]] Sent: Friday, March 16, 2001 4:30 AM To: Orion-Interest Subject:SV: Problems with JNDI lookups of defined in application-client.xml from a client application... Did you try looking up "java:comp/env/ejb/id" ? WR > -Ursprungligt meddelande- > Från: Alex Paransky [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] > Skickat: den 15 mars 2001 14:11 > Till: Orion-Interest > Ämne: Problems with JNDI lookups of defined in > application-client.xml from a client application... > > > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that > ejb/id cannot be > found: > > Exception in thread "main" > javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot > create references > and use the name specified in to lookup the > components? Or > am I missing something? > > Thanks. > -AP_ > > >
Re: Problems with JNDI lookups of defined in application-client.xml from a client application...
try: new InitialContext().lookup("java:comp/env/ejb/id"); - Original Message - From: "Alex Paransky" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, March 15, 2001 10:10 PM Subject: Problems with JNDI lookups of defined in application-client.xml from a client application... > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that ejb/id cannot be > found: > > Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot create references > and use the name specified in to lookup the components? Or > am I missing something? > > Thanks. > -AP_ > > > >
SV: Problems with JNDI lookups of defined in application-client.xml from a client application...
Title: SV: Problems with JNDI lookups of defined in application-client.xml from a client application... Did you try looking up "java:comp/env/ejb/id" ? WR > -Ursprungligt meddelande- > Från: Alex Paransky [mailto:[EMAIL PROTECTED]] > Skickat: den 15 mars 2001 14:11 > Till: Orion-Interest > Ämne: Problems with JNDI lookups of defined in > application-client.xml from a client application... > > > I have a client application which has META-INF with the following > application-client.xml definition: > > > > ejb/id > Session > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > Id > > > > In the client, I attempt to do the following: > > new InitialContext().lookup("ejb/id"); > > The above fails with the naming exception, telling me that > ejb/id cannot be > found: > > Exception in thread "main" > javax.naming.NameNotFoundException: ejb/id not > found > at com.evermind.server.rmi.RMIContext.lookup(JAX) > at com.evermind.naming.jz.lookup(JAX) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at com.indnet.model.id.test.Client.main(Client.java:16) > > If I change my client line to read: > > new InitialContext().lookup("Id"); > > Things work correctly. "Id" is the used for my object: > > > > Id > com.indnet.model.id.IdSessionHome > com.indnet.model.id.IdSession > com.indnet.model.id.IdSessionBean > Stateless > ... > > What is the purpose of application-client.xml if I cannot > create references > and use the name specified in to lookup the > components? Or > am I missing something? > > Thanks. > -AP_ > > >
RE: Problems with JNDI lookups of defined inapplication-client.xml from a client application...
I think application-client.xml is broken in Orion. The whole purpose of having application-client.xml is to be able to map a client written by one vendor, to the EJB written by another vendor. Has any one been able to "properly" use to map to where both are NOT the same string? Thanks. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky Sent: Thursday, March 15, 2001 2:11 PM To: Orion-Interest Subject: Problems with JNDI lookups of defined in application-client.xml from a client application... I have a client application which has META-INF with the following application-client.xml definition: ejb/id Session com.indnet.model.id.IdSessionHome com.indnet.model.id.IdSession Id In the client, I attempt to do the following: new InitialContext().lookup("ejb/id"); The above fails with the naming exception, telling me that ejb/id cannot be found: Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not found at com.evermind.server.rmi.RMIContext.lookup(JAX) at com.evermind.naming.jz.lookup(JAX) at javax.naming.InitialContext.lookup(InitialContext.java:350) at com.indnet.model.id.test.Client.main(Client.java:16) If I change my client line to read: new InitialContext().lookup("Id"); Things work correctly. "Id" is the used for my object: Id com.indnet.model.id.IdSessionHome com.indnet.model.id.IdSession com.indnet.model.id.IdSessionBean Stateless ... What is the purpose of application-client.xml if I cannot create references and use the name specified in to lookup the components? Or am I missing something? Thanks. -AP_
Problems with JNDI lookups of defined in application-client.xml from a client application...
I have a client application which has META-INF with the following application-client.xml definition: ejb/id Session com.indnet.model.id.IdSessionHome com.indnet.model.id.IdSession Id In the client, I attempt to do the following: new InitialContext().lookup("ejb/id"); The above fails with the naming exception, telling me that ejb/id cannot be found: Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not found at com.evermind.server.rmi.RMIContext.lookup(JAX) at com.evermind.naming.jz.lookup(JAX) at javax.naming.InitialContext.lookup(InitialContext.java:350) at com.indnet.model.id.test.Client.main(Client.java:16) If I change my client line to read: new InitialContext().lookup("Id"); Things work correctly. "Id" is the used for my object: Id com.indnet.model.id.IdSessionHome com.indnet.model.id.IdSession com.indnet.model.id.IdSessionBean Stateless ... What is the purpose of application-client.xml if I cannot create references and use the name specified in to lookup the components? Or am I missing something? Thanks. -AP_
RE: RP/Please Help: Connecting to JMS from client application
Well, I worked on this problem b/c it is something I eventually want to do, and I am finally able to connect to a remote JMS server. On the machine running JMS/Orion, you need to edit orion/config/jms.xml. You need to change the tag to contain the host that it is running on, don't just let it default to localhost (127.0.0.1). Anyways, your tag should look something like: Then on the remote machine make sure that in your jndi.properties you are pointing to that machine as the service provider. jason
Re: RP/Please Help: Connecting to JMS from client application
I already have that and can use EJBs residing on machineA from a client on machineB. The problem is in using JMS. The client on machineB wants to subscribe to a message queue. Since Orion server is running on machineA, the JMS server is also running there. How does the client reference it? Vidur "Luong, Tony S322" wrote: > try setting the hostname in jndi.properties on machine B. > e.g. > java.naming.provider.url=ormi://machineA > > > -Original Message- > > From: Vidur Dhanda [SMTP:[EMAIL PROTECTED]] > > Sent: Thursday, December 07, 2000 9:42 AM > > To: Orion-Interest > > Subject: RP/Please Help: Connecting to JMS from client application > > > > Please help! Somebody must be using JMS from a client application > > running on a machine different than the server. How do I configure a > > client to use JMS. Say, the EJB Server runs on machine A. The client > > runs on machine B. How does the client on machine B know the location > > of JMS (which should be machine A)? The client always tries to connect > > to a JMS server on localhost. The only place where, I think, a hostname > > can be provided is in jms.xml. But that's a part of Orion configuration > > files. How do I configure the client? I tried copying jms.xml (in a > > desperate attempt) into the same location as > > orion-application-client.xml but that didn't work. > > > > Please, if anyone knows the answer, help me! This is a big problem for > > me right now. > > > > Thanks, > > Vidur > > > > PS. If possible, please also cc me directly. It sometimes takes a > > while for the list to distribute the postings and I'm really stuck! > > > > > > -- > CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please >immediately notify the sender by e-mail at the address shown. This e-mail >transmission may contain confidential information. This information is intended only >for the use of the individual(s) or entity to whom it is intended even if addressed >incorrectly. Please delete it from your files if you are not the intended recipient. > Thank you for your compliance. > >
RE: RP/Please Help: Connecting to JMS from client application
try setting the hostname in jndi.properties on machine B. e.g. java.naming.provider.url=ormi://machineA > -Original Message- > From: Vidur Dhanda [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, December 07, 2000 9:42 AM > To: Orion-Interest > Subject: RP/Please Help: Connecting to JMS from client application > > Please help! Somebody must be using JMS from a client application > running on a machine different than the server. How do I configure a > client to use JMS. Say, the EJB Server runs on machine A. The client > runs on machine B. How does the client on machine B know the location > of JMS (which should be machine A)? The client always tries to connect > to a JMS server on localhost. The only place where, I think, a hostname > can be provided is in jms.xml. But that's a part of Orion configuration > files. How do I configure the client? I tried copying jms.xml (in a > desperate attempt) into the same location as > orion-application-client.xml but that didn't work. > > Please, if anyone knows the answer, help me! This is a big problem for > me right now. > > Thanks, > Vidur > > PS. If possible, please also cc me directly. It sometimes takes a > while for the list to distribute the postings and I'm really stuck! > > -- CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please immediately notify the sender by e-mail at the address shown. This e-mail transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance.
RP/Please Help: Connecting to JMS from client application
Please help! Somebody must be using JMS from a client application running on a machine different than the server. How do I configure a client to use JMS. Say, the EJB Server runs on machine A. The client runs on machine B. How does the client on machine B know the location of JMS (which should be machine A)? The client always tries to connect to a JMS server on localhost. The only place where, I think, a hostname can be provided is in jms.xml. But that's a part of Orion configuration files. How do I configure the client? I tried copying jms.xml (in a desperate attempt) into the same location as orion-application-client.xml but that didn't work. Please, if anyone knows the answer, help me! This is a big problem for me right now. Thanks, Vidur PS. If possible, please also cc me directly. It sometimes takes a while for the list to distribute the postings and I'm really stuck!
Re: Client application
To all that have been helping me with this problem I want to thank you. I have made progress due to your help. I have one more hurdle to overcome and I am hoping that you can bear with me and continue your help. I have finally got my application to connect to the application server. What I found out thru this forum ( in particular Frank ) is that I needed and orion-application-client.xml file to resolve the ejb. Thanks Frank. Here is my current problem, my ejb has a remote and home interface called Team and TeamHome respectively. My client.jar file contains the following: TeamBean.class application-client.xml orion-application-client.xml When I ran the main() I tried getting the reference to TeamHome and it told me that it could not find the class file was not found. I then added the TeamHome and Team class files into my jar file and I get the following error: java.rmi.RemoteException at com.evermind.server.rmi.bb.invokeMethod(JAX, Compiled Code) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX, Compiled Code) at __Proxy0.findByPrimaryKey(Unknown Source) at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) Does anybody have any ideas? Thanks in advance, -Danno
Re: Client application
Frank, Thanks again for helping. Here is what I found. No where does the orion-application-client.xml exist. Is this something that should be created by the build.xml file or is this something that you provided? Also, what is the purpose of this file? I am sure that I am not understanding something. I though the application-client.xml file is all that we needed. Can you please continue to help me through this process? Thanks -Dan - Original Message - From: "Frank Eggink" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, October 07, 2000 2:13 PM Subject: RE: Client application > Hope I haven't made any errors in the example causing to to waiste your > time (as i did with my typo comp:/java/env). If so let me know. I'll fix > the example. > > The error messages tell me that the system can't find the home interface. > From the output I can't deduct what is wrong (which could be a lack of > understanding from my side). I see two possibilities: 1) either there is a > naming problem, or 2) resolving the class file for the home interface goes > wrong. > > Here are some things I would have a look at: > > 1. Check wether there is a orion-application-client.xml in the META-INF > folder/directory on your client and whether the name you are using is in > there. You specify the name in java:/comp/env/. The name in the > orion-application-client.xml file points you to the name in the > application-client.xml (on the client) file. > > 2. Check that the in the application-client.xml file corresponds > with the in the ejb-jar.xml file on the server. > > 3. When you are sure that it is all correct, I would have a look at the > mapping for the Home (plus the Remote and EJB) classes. Check whether the > home interfaces defined in application-client.xml and in the ejb-jar.xml > refer to the correct class files. All though I think that if the one in > ejb-jar.xml is wrong the server will complain when starting the > application. Make also sure they are in the right folders/directories > (/hello/ejb). > > > Hope this helps, > Frank > > On Friday, October 06, 2000 9:22 PM, Kurt Hoyt [SMTP:[EMAIL PROTECTED]] wrote: > > I've gotten that same error, usually the first time I run a client > program. > > I run it again, and it works fine with no NamingException. Very strange. > > > > Kurt in Atlanta > > > > >-Original Message- > > >From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]] > > >Sent: Friday, October 06, 2000 8:27 AM > > >To: Orion-Interest > > >Subject: Re: Client application > > > > > > > > >Thanks for your response Robert. You were right about the > > >typo. It really > > >was in my email. The path that I use is > > >;\orion\orion.jar;\orion\ejb.jar;\orion\jdbc.jar;\orion\jndi.ja > > >r;\orion\mai > > >l.jar;orion-primer-client.jar > > > > > > > > >Since this email I have gotten the client to run, now I get > > >the following > > >error: > > > > > >Unable to get initial JNDI context: javax.naming.NamingException: Error > > >reading application-client descriptor: No location specified > > >and no suitable > > >instance of the type 'hello.ejb.Hello' found for the ejb-ref > > >ejb/HelloHome > > >Exception in thread "main" java.lang.Exception: We're going to > > >the dogs! > > >at hello.client.HelloClient.main(HelloClient.java:26) > > > > > >- Original Message - > > >From: "Robert Krueger" <[EMAIL PROTECTED]> > > >To: "Orion-Interest" <[EMAIL PROTECTED]> > > >Sent: Friday, October 06, 2000 4:33 PM > > >Subject: Re: Client application > > > > > > > > >At 09:48 06.10.00 , you wrote: > > >>Frank, > > >>I followed your example and deployed the orion-primer > > >application. I copied > > >>the necessary JAR's into my directory along with the > > >jndi.properties file. > > >I > > >>also copied the orion-primer-client.jar into my directory. I > > >then ran the > > >>following > > >> > > >>java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar > > >> > > >>hello.client.HelloClient > > >> > > >>I got the following error: > > >>Exception in thread "main" java.lang.NoClassDefFoundError: > > >>hello/client/HelloClient > > >> > > >>Any idea? > > > > > >it obviously doesn't find the class. a typo in the classpath maybe ;-) > > > > > >robert > > > > > >>-Danno > > > > > >(-) Robert Kruger > > >(-) SIGNAL 7 Gesellschaft fur Informationstechnologie mbH > > >(-) Bruder-Knau?-Str. 79 - 64285 Darmstadt, > > >(-) Tel: 06151 665401, Fax: 06151 665373 > > >(-) [EMAIL PROTECTED], www.signal7.de > > > > > > > > > > > > > > << File: ATT3.html >> > >
Re: Client application Please Help
Title: RE: Client application Please Help Hello, Thanks for continuing to help me. I am really having a difficult time with this. I have no idea on how to solve the problem. I checked the JAR file and the application-client.xml file is in there. Thanks again, -Dan - Original Message - From: Pantelis, Thomas To: Orion-Interest Sent: Friday, October 06, 2000 8:58 PM Subject: RE: Client application Please Help You're not having a good day are you? Make sure the client jar has the application-client.xml in the META-INF directory. -Original Message-From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]]Sent: Friday, October 06, 2000 8:15 AMTo: Orion-InterestSubject: Re: Client application Please Help Thank you for your response. I have tried your suggestion and here is what I get: javax.naming.NamingException: META-INF/application-client.xml resource not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.(InitialContext.java:182) at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) My team-client.jar has application-client.xml in it. I do not understand why it can not be found. Any further help would be appreciated. -Danno >From: "Pantelis, Thomas" <[EMAIL PROTECTED]>>Reply-To: Orion-Interest <orion-interest@orionservercom>>To: Orion-Interest <orion-interest@orionservercom>>Subject: RE: Client application Please Help>Date: Fri, 6 Oct 2000 10:31:00 -0400>>The correct lookup is "java:comp/env/TeamBean". I assume you're running you're client>outside of Orion? Make sure your provider_url JNDI prop points to>"ormi://localhost/" where is the name of the TeamBean app in>server.xml.>>-Original Message->From: Frank Eggink [mailto:[EMAIL PROTECTED]]>Sent: Friday, October 06, 2000 8:05 AM>To: Orion-Interest>Subject: RE: Client application Please Help>>>I bet you'll have to change ic.lookup("TeamBean") in to>ic.lookup("comp:/java/env/TeamBean"), a bit depending on what's defined in>your *.xml files.>>These files define the name under which the bean gets registered.>"comp:/java/env/" is a fixed? prefix.>>Frank>>On Thursday, October 05, 2000 7:18 PM, Daniel C. DiCesare>[SMTP:[EMAIL PROTECTED]] wrote:> > Frank,> > I checked out your example but I am continuing to experience problems.>Here> > is what I have. I have included the script for my xml files below.> >> > I have deployed an EJB called Team onto Orion. It sits in a EAR file>which> > within it has a Team.jar file. The JAR file contains the following:> > Team.class - ( remote interface )> > TeamHome.class - ( home interface )> > TeamEJB - ( EJB )> > ejb-jar.xml - ( deployment descriptor )> >> > I then created a team-client.jar which consists of the following:> > TeamClient.class - ( client )> > application-client.xml - ( client xml )> >> > In my TeamClient I attempt to connect to the TeamEJB as follows:> > Context ic = new InitialContext();> > Object obj = ic.lookup( "TeamBean" );> > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj,> > TeamHome.class );> >> >> >> >> >> > When I try to run the client I get the following message:> > javax.naming.NamingException: Error reading application-client>descriptor:> > No location specified and no suitable instance of the type 'Team' found>for> > the ejb-ref TeamBean> > at> >>com.evermind.server.ApplicationClientInitialContextFactory.getInitialCon>text> > (JAX, Compiled Code)> > at> > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)> > at> > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)> > at javax.naming.InitialContext.init(InitialContext.java:226)> > at javax.naming.InitialContext.(InitialContext.java:182)> > at TeamRandomTrade.main(TeamRandomTrade.java, Co
RE: Client application
Hope I haven't made any errors in the example causing to to waiste your time (as i did with my typo comp:/java/env). If so let me know. I'll fix the example. The error messages tell me that the system can't find the home interface. >From the output I can't deduct what is wrong (which could be a lack of understanding from my side). I see two possibilities: 1) either there is a naming problem, or 2) resolving the class file for the home interface goes wrong. Here are some things I would have a look at: 1. Check wether there is a orion-application-client.xml in the META-INF folder/directory on your client and whether the name you are using is in there. You specify the name in java:/comp/env/. The name in the orion-application-client.xml file points you to the name in the application-client.xml (on the client) file. 2. Check that the in the application-client.xml file corresponds with the in the ejb-jar.xml file on the server. 3. When you are sure that it is all correct, I would have a look at the mapping for the Home (plus the Remote and EJB) classes. Check whether the home interfaces defined in application-client.xml and in the ejb-jar.xml refer to the correct class files. All though I think that if the one in ejb-jar.xml is wrong the server will complain when starting the application. Make also sure they are in the right folders/directories (/hello/ejb). Hope this helps, Frank On Friday, October 06, 2000 9:22 PM, Kurt Hoyt [SMTP:[EMAIL PROTECTED]] wrote: > I've gotten that same error, usually the first time I run a client program. > I run it again, and it works fine with no NamingException. Very strange. > > Kurt in Atlanta > > >-Original Message- > >From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]] > >Sent: Friday, October 06, 2000 8:27 AM > >To: Orion-Interest > >Subject: Re: Client application > > > > > >Thanks for your response Robert. You were right about the > >typo. It really > >was in my email. The path that I use is > >;\orion\orion.jar;\orion\ejb.jar;\orion\jdbc.jar;\orion\jndi.ja > >r;\orion\mai > >l.jar;orion-primer-client.jar > > > > > >Since this email I have gotten the client to run, now I get > >the following > >error: > > > >Unable to get initial JNDI context: javax.naming.NamingException: Error > >reading application-client descriptor: No location specified > >and no suitable > >instance of the type 'hello.ejb.Hello' found for the ejb-ref > >ejb/HelloHome > >Exception in thread "main" java.lang.Exception: We're going to > >the dogs! > >at hello.client.HelloClient.main(HelloClient.java:26) > > > >- Original Message - > >From: "Robert Krueger" <[EMAIL PROTECTED]> > >To: "Orion-Interest" <[EMAIL PROTECTED]> > >Sent: Friday, October 06, 2000 4:33 PM > >Subject: Re: Client application > > > > > >At 09:48 06.10.00 , you wrote: > >>Frank, > >>I followed your example and deployed the orion-primer > >application. I copied > >>the necessary JAR's into my directory along with the > >jndi.properties file. > >I > >>also copied the orion-primer-client.jar into my directory. I > >then ran the > >>following > >> > >>java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar > >> > >>hello.client.HelloClient > >> > >>I got the following error: > >>Exception in thread "main" java.lang.NoClassDefFoundError: > >>hello/client/HelloClient > >> > >>Any idea? > > > >it obviously doesn't find the class. a typo in the classpath maybe ;-) > > > >robert > > > >>-Danno > > > >(-) Robert Kruger > >(-) SIGNAL 7 Gesellschaft fur Informationstechnologie mbH > >(-) Bruder-Knau?-Str. 79 - 64285 Darmstadt, > >(-) Tel: 06151 665401, Fax: 06151 665373 > >(-) [EMAIL PROTECTED], www.signal7.de > > > > > > > > > << File: ATT3.html >>
RE: Client application Please Help
Title: RE: Client application Please Help You're not having a good day are you? Make sure the client jar has the application-client.xml in the META-INF directory. -Original Message-From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]]Sent: Friday, October 06, 2000 8:15 AMTo: Orion-InterestSubject: Re: Client application Please Help Thank you for your response. I have tried your suggestion and here is what I get: javax.naming.NamingException: META-INF/application-client.xml resource not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.(InitialContext.java:182) at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) My team-client.jar has application-client.xml in it. I do not understand why it can not be found. Any further help would be appreciated. -Danno >From: "Pantelis, Thomas" <[EMAIL PROTECTED]>>Reply-To: Orion-Interest <orion-interest@orionservercom>>To: Orion-Interest <orion-interest@orionservercom>>Subject: RE: Client application Please Help>Date: Fri, 6 Oct 2000 10:31:00 -0400>>The correct lookup is "java:comp/env/TeamBean". I assume you're running you're client>outside of Orion? Make sure your provider_url JNDI prop points to>"ormi://localhost/" where is the name of the TeamBean app in>server.xml.>>-Original Message->From: Frank Eggink [mailto:[EMAIL PROTECTED]]>Sent: Friday, October 06, 2000 8:05 AM>To: Orion-Interest>Subject: RE: Client application Please Help>>>I bet you'll have to change ic.lookup("TeamBean") in to>ic.lookup("comp:/java/env/TeamBean"), a bit depending on what's defined in>your *.xml files.>>These files define the name under which the bean gets registered.>"comp:/java/env/" is a fixed? prefix.>>Frank>>On Thursday, October 05, 2000 7:18 PM, Daniel C. DiCesare>[SMTP:[EMAIL PROTECTED]] wrote:> > Frank,> > I checked out your example but I am continuing to experience problems.>Here> > is what I have. I have included the script for my xml files below.> >> > I have deployed an EJB called Team onto Orion. It sits in a EAR file>which> > within it has a Team.jar file. The JAR file contains the following:> > Team.class - ( remote interface )> > TeamHome.class - ( home interface )> > TeamEJB - ( EJB )> > ejb-jar.xml - ( deployment descriptor )> >> > I then created a team-client.jar which consists of the following:> > TeamClient.class - ( client )> > application-client.xml - ( client xml )> >> > In my TeamClient I attempt to connect to the TeamEJB as follows:> > Context ic = new InitialContext();> > Object obj = ic.lookup( "TeamBean" );> > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj,> > TeamHome.class );> >> >> >> >> >> > When I try to run the client I get the following message:> > javax.naming.NamingException: Error reading application-client>descriptor:> > No location specified and no suitable instance of the type 'Team' found>for> > the ejb-ref TeamBean> > at> >>com.evermind.server.ApplicationClientInitialContextFactory.getInitialCon>text> > (JAX, Compiled Code)> > at> > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)> > at> > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)> > at javax.naming.InitialContext.init(InitialContext.java:226)> > at javax.naming.InitialContext.(InitialContext.java:182)> > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code)> >> >> > Can you or anyone please advise as to what I am doing wrong?> >> > Thanks in advance.> > -Danno> >> >> >> > The ejb-jar.xml looks as follows:> >> > > > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>> >> > > > no description> > TeamEJB> > > > > > no description> > TeamBean> > TeamBean> > TeamHom
RE: Client application
Title: RE: Client application I've gotten that same error, usually the first time I run a client program. I run it again, and it works fine with no NamingException. Very strange. Kurt in Atlanta >-Original Message- >From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]] >Sent: Friday, October 06, 2000 8:27 AM >To: Orion-Interest >Subject: Re: Client application > > >Thanks for your response Robert. You were right about the >typo. It really >was in my email. The path that I use is >;\orion\orion.jar;\orion\ejb.jar;\orion\jdbc.jar;\orion\jndi.ja >r;\orion\mai >l.jar;orion-primer-client.jar > > >Since this email I have gotten the client to run, now I get >the following >error: > >Unable to get initial JNDI context: javax.naming.NamingException: Error >reading application-client descriptor: No location specified >and no suitable >instance of the type 'hello.ejb.Hello' found for the ejb-ref >ejb/HelloHome >Exception in thread "main" java.lang.Exception: We're going to >the dogs! > at hello.client.HelloClient.main(HelloClient.java:26) > >- Original Message - >From: "Robert Krueger" <[EMAIL PROTECTED]> >To: "Orion-Interest" <[EMAIL PROTECTED]> >Sent: Friday, October 06, 2000 4:33 PM >Subject: Re: Client application > > >At 09:48 06.10.00 , you wrote: >>Frank, >>I followed your example and deployed the orion-primer >application. I copied >>the necessary JAR's into my directory along with the >jndi.properties file. >I >>also copied the orion-primer-client.jar into my directory. I >then ran the >>following >> >>java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar >> >>hello.client.HelloClient >> >>I got the following error: >>Exception in thread "main" java.lang.NoClassDefFoundError: >>hello/client/HelloClient >> >>Any idea? > >it obviously doesn't find the class. a typo in the classpath maybe ;-) > >robert > >>-Danno > >(-) Robert Krüger >(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH >(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, >(-) Tel: 06151 665401, Fax: 06151 665373 >(-) [EMAIL PROTECTED], www.signal7.de > > > >
RE: Client application
Not to my understanding, I think you need to include the necessary orion jars -Danno >From: "Pantelis, Thomas" <[EMAIL PROTECTED]> >Reply-To: Orion-Interest <[EMAIL PROTECTED]> >To: Orion-Interest <[EMAIL PROTECTED]> >Subject: RE: Client application >Date: Fri, 6 Oct 2000 12:55:02 -0400 > >Shouldn't it be orion-primer-client.jar? > >-Original Message- >From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]] >Sent: Friday, October 06, 2000 4:48 AM >To: Orion-Interest >Subject: Re: Client application > > >Frank, >I followed your example and deployed the orion-primer application. I copied >the necessary JAR's into my directory along with the jndi.properties file. >I >also copied the orion-primer-client.jar into my directory. I then ran the >following > >java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar >hello.client.HelloClient > >I got the following error: >Exception in thread "main" java.lang.NoClassDefFoundError: >hello/client/HelloClient > >Any idea? > >-Danno _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
Re: Client application
Thanks for your response Robert. You were right about the typo. It really was in my email. The path that I use is ;\orion\orion.jar;\orion\ejb.jar;\orion\jdbc.jar;\orion\jndi.jar;\orion\mai l.jar;orion-primer-client.jar Since this email I have gotten the client to run, now I get the following error: Unable to get initial JNDI context: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'hello.ejb.Hello' found for the ejb-ref ejb/HelloHome Exception in thread "main" java.lang.Exception: We're going to the dogs! at hello.client.HelloClient.main(HelloClient.java:26) - Original Message - From: "Robert Krueger" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, October 06, 2000 4:33 PM Subject: Re: Client application At 09:48 06.10.00 , you wrote: >Frank, >I followed your example and deployed the orion-primer application. I copied >the necessary JAR's into my directory along with the jndi.properties file. I >also copied the orion-primer-client.jar into my directory. I then ran the >following > >java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar > >hello.client.HelloClient > >I got the following error: >Exception in thread "main" java.lang.NoClassDefFoundError: >hello/client/HelloClient > >Any idea? it obviously doesn't find the class. a typo in the classpath maybe ;-) robert >-Danno (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: Client application Please Help
Title: RE: Client application Please Help Thank you for your response. I have tried your suggestion and here is what I get: javax.naming.NamingException: META-INF/application-client.xml resource not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.(InitialContext.java:182) at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) My team-client.jar has application-client.xml in it. I do not understand why it can not be found. Any further help would be appreciated. -Danno >From: "Pantelis, Thomas" <[EMAIL PROTECTED]>>Reply-To: Orion-Interest <orion-interest@orionservercom>>To: Orion-Interest <orion-interest@orionservercom>>Subject: RE: Client application Please Help>Date: Fri, 6 Oct 2000 10:31:00 -0400>>The correct lookup is "java:comp/env/TeamBean". I assume you're running you're client>outside of Orion? Make sure your provider_url JNDI prop points to>"ormi://localhost/" where is the name of the TeamBean app in>server.xml.>>-Original Message->From: Frank Eggink [mailto:[EMAIL PROTECTED]]>Sent: Friday, October 06, 2000 8:05 AM>To: Orion-Interest>Subject: RE: Client application Please Help>>>I bet you'll have to change ic.lookup("TeamBean") in to>ic.lookup("comp:/java/env/TeamBean"), a bit depending on what's defined in>your *.xml files.>>These files define the name under which the bean gets registered.>"comp:/java/env/" is a fixed? prefix.>>Frank>>On Thursday, October 05, 2000 7:18 PM, Daniel C. DiCesare>[SMTP:[EMAIL PROTECTED]] wrote:> > Frank,> > I checked out your example but I am continuing to experience problems.>Here> > is what I have. I have included the script for my xml files below.> >> > I have deployed an EJB called Team onto Orion. It sits in a EAR file>which> > within it has a Team.jar file. The JAR file contains the following:> > Team.class - ( remote interface )> > TeamHome.class - ( home interface )> > TeamEJB - ( EJB )> > ejb-jar.xml - ( deployment descriptor )> >> > I then created a team-client.jar which consists of the following:> > TeamClient.class - ( client )> > application-client.xml - ( client xml )> >> > In my TeamClient I attempt to connect to the TeamEJB as follows:> > Context ic = new InitialContext();> > Object obj = ic.lookup( "TeamBean" );> > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj,> > TeamHome.class );> >> >> >> >> >> > When I try to run the client I get the following message:> > javax.naming.NamingException: Error reading application-client>descriptor:> > No location specified and no suitable instance of the type 'Team' found>for> > the ejb-ref TeamBean> > at> >>com.evermind.server.ApplicationClientInitialContextFactory.getInitialCon>text> > (JAX, Compiled Code)> > at> > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)> > at> > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)> > at javax.naming.InitialContext.init(InitialContext.java:226)> > at javax.naming.InitialContext.(InitialContext.java:182)> > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code)> >> >> > Can you or anyone please advise as to what I am doing wrong?> >> > Thanks in advance.> > -Danno> >> >> >> > The ejb-jar.xml looks as follows:> >> > > > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>> >> > > > no description> > TeamEJB> > > > > > no description> > TeamBean> > TeamBean> > TeamHome> > Team> > TeamEJB> > Bean> > java.lang.Integer> > False> > > > A description for ResourceRefName> > jdbc/SF> > javax.sql.DataSource> > Container> > > > > > > > > >> >> >> > My application-client.xml file looks as follows:> > > > > > Application Client 1.2//EN"> > "http://java.sun.com/j2ee/d
RE: Client application
Title: RE: Client application Shouldn't it be orion-primer-client.jar? -Original Message- From: Daniel C. DiCesare [mailto:[EMAIL PROTECTED]] Sent: Friday, October 06, 2000 4:48 AM To: Orion-Interest Subject: Re: Client application Frank, I followed your example and deployed the orion-primer application. I copied the necessary JAR's into my directory along with the jndi.properties file. I also copied the orion-primer-client.jar into my directory. I then ran the following java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar hello.client.HelloClient I got the following error: Exception in thread "main" java.lang.NoClassDefFoundError: hello/client/HelloClient Any idea? -Danno
Re: Client application Please Help
Hi Frank, Thanks again for following up. I have tried your suggestion and now I am getting a different message. Here it is: javax.naming.NamingException: META-INF/application-client.xml resource not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.(InitialContext.java:182) at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) Any idea on what I can do? Thanks -Danno - Original Message - From: "Frank Eggink" <> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, October 06, 2000 1:05 PM Subject: RE: Client application Please Help > I bet you'll have to change ic.lookup("TeamBean") in to > ic.lookup("comp:/java/env/TeamBean"), a bit depending on what's defined in > your *.xml files. > > These files define the name under which the bean gets registered. > "comp:/java/env/" is a fixed? prefix. > > Frank > > On Thursday, October 05, 2000 7:18 PM, Daniel C. DiCesare > [SMTP:[EMAIL PROTECTED]] wrote: > > Frank, > > I checked out your example but I am continuing to experience problems. > Here > > is what I have. I have included the script for my xml files below. > > > > I have deployed an EJB called Team onto Orion. It sits in a EAR file > which > > within it has a Team.jar file. The JAR file contains the following: > > Team.class - ( remote interface ) > > TeamHome.class - ( home interface ) > > TeamEJB - ( EJB ) > > ejb-jar.xml - ( deployment descriptor ) > > > > I then created a team-client.jar which consists of the following: > > TeamClient.class - ( client ) > > application-client.xml - ( client xml ) > > > > In my TeamClient I attempt to connect to the TeamEJB as follows: > > Context ic = new InitialContext(); > > Object obj = ic.lookup( "TeamBean" ); > > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > > TeamHome.class ); > > > > > > > > > > > > When I try to run the client I get the following message: > > javax.naming.NamingException: Error reading application-client > descriptor: > > No location specified and no suitable instance of the type 'Team' found > for > > the ejb-ref TeamBean > > at > > > com.evermind.server.ApplicationClientInitialContextFactory.getInitialCon > text > > (JAX, Compiled Code) > > at > > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > > at > > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > > at javax.naming.InitialContext.init(InitialContext.java:226) > > at javax.naming.InitialContext.(InitialContext.java:182) > > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > > > > > Can you or anyone please advise as to what I am doing wrong? > > > > Thanks in advance. > > -Danno > > > > > > > > The ejb-jar.xml looks as follows: > > > > > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > > > > no description > > TeamEJB > > > > > > no description > > TeamBean > > TeamBean > > TeamHome > > Team > > TeamEJB > > Bean > > java.lang.Integer > > False > > > > A description for ResourceRefName > > jdbc/SF > > javax.sql.DataSource > > Container > > > > > > > > > > > > > > > > My application-client.xml file looks as follows: > > > > > Application Client 1.2//EN" > > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > > > SportsFund > > > > > > TeamBean > > Session > > TeamHome > > Team > > > > > > > >
Re: Client application
At 09:48 06.10.00 , you wrote: >Frank, >I followed your example and deployed the orion-primer application. I copied >the necessary JAR's into my directory along with the jndi.properties file. I >also copied the orion-primer-client.jar into my directory. I then ran the >following > >java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar > >hello.client.HelloClient > >I got the following error: >Exception in thread "main" java.lang.NoClassDefFoundError: >hello/client/HelloClient > >Any idea? it obviously doesn't find the class. a typo in the classpath maybe ;-) robert >-Danno (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
Re: Client application Please Help
Thanks for your response Luis. I do have the jndi.properties in my classpath. To ensure this I copied it to the directory I am working out of. Thanks again, -Danno - Original Message - From: "Luis M Bernardo" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, October 06, 2000 2:02 PM Subject: Re: Client application Please Help > > > > do you have the jndi.properties file in the classpath? if you just create > an initial context by calling the no argument constructor you need to > include that file in the classpath. > > luis > > > On Thu, 5 Oct 2000, Daniel C. DiCesare wrote: > > > Frank, > > I checked out your example but I am continuing to experience problems. Here > > is what I have. I have included the script for my xml files below. > > > > I have deployed an EJB called Team onto Orion. It sits in a EAR file which > > within it has a Team.jar file. The JAR file contains the following: > > Team.class - ( remote interface ) > > TeamHome.class - ( home interface ) > > TeamEJB - ( EJB ) > > ejb-jar.xml - ( deployment descriptor ) > > > > I then created a team-client.jar which consists of the following: > > TeamClient.class - ( client ) > > application-client.xml - ( client xml ) > > > > In my TeamClient I attempt to connect to the TeamEJB as follows: > > Context ic = new InitialContext(); > > Object obj = ic.lookup( "TeamBean" ); > > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > > TeamHome.class ); > > > > > > > > > > > > When I try to run the client I get the following message: > > javax.naming.NamingException: Error reading application-client descriptor: > > No location specified and no suitable instance of the type 'Team' found for > > the ejb-ref TeamBean > > at > > com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext > > (JAX, Compiled Code) > > at > > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > > at > > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > > at javax.naming.InitialContext.init(InitialContext.java:226) > > at javax.naming.InitialContext.(InitialContext.java:182) > > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > > > > > Can you or anyone please advise as to what I am doing wrong? > > > > Thanks in advance. > > -Danno > > > > > > > > The ejb-jar.xml looks as follows: > > > > > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > > > > no description > > TeamEJB > > > > > > no description > > TeamBean > > TeamBean > > TeamHome > > Team > > TeamEJB > > Bean > > java.lang.Integer > > False > > > > A description for ResourceRefName > > jdbc/SF > > javax.sql.DataSource > > Container > > > > > > > > > > > > > > > > My application-client.xml file looks as follows: > > > > > Application Client 1.2//EN" > > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > > > SportsFund > > > > > > TeamBean > > Session > > TeamHome > > Team > > > > > > > > > > >
RE: Client application Please Help
Title: RE: Client application Please Help The correct lookup is "java:comp/env/TeamBean". I assume you're running you're client outside of Orion? Make sure your provider_url JNDI prop points to "ormi://localhost/" where is the name of the TeamBean app in server.xml. -Original Message- From: Frank Eggink [mailto:[EMAIL PROTECTED]] Sent: Friday, October 06, 2000 8:05 AM To: Orion-Interest Subject: RE: Client application Please Help I bet you'll have to change ic.lookup("TeamBean") in to ic.lookup("comp:/java/env/TeamBean"), a bit depending on what's defined in your *.xml files. These files define the name under which the bean gets registered. "comp:/java/env/" is a fixed? prefix. Frank On Thursday, October 05, 2000 7:18 PM, Daniel C. DiCesare [SMTP:[EMAIL PROTECTED]] wrote: > Frank, > I checked out your example but I am continuing to experience problems. Here > is what I have. I have included the script for my xml files below. > > I have deployed an EJB called Team onto Orion. It sits in a EAR file which > within it has a Team.jar file. The JAR file contains the following: > Team.class - ( remote interface ) > TeamHome.class - ( home interface ) > TeamEJB - ( EJB ) > ejb-jar.xml - ( deployment descriptor ) > > I then created a team-client.jar which consists of the following: > TeamClient.class - ( client ) > application-client.xml - ( client xml ) > > In my TeamClient I attempt to connect to the TeamEJB as follows: > Context ic = new InitialContext(); > Object obj = ic.lookup( "TeamBean" ); > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > TeamHome.class ); > > > > > > When I try to run the client I get the following message: > javax.naming.NamingException: Error reading application-client descriptor: > No location specified and no suitable instance of the type 'Team' found for > the ejb-ref TeamBean > at > com.evermind.server.ApplicationClientInitialContextFactory.getInitialCon text > (JAX, Compiled Code) > at > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > at > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > at javax.naming.InitialContext.init(InitialContext.java:226) > at javax.naming.InitialContext.(InitialContext.java:182) > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > > Can you or anyone please advise as to what I am doing wrong? > > Thanks in advance. > -Danno > > > > The ejb-jar.xml looks as follows: > > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > no description > TeamEJB > > > no description > TeamBean > TeamBean > TeamHome > Team > TeamEJB > Bean > java.lang.Integer > False > > A description for ResourceRefName > jdbc/SF > javax.sql.DataSource > Container > > > > > > > > My application-client.xml file looks as follows: > > > Application Client 1.2//EN" > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > SportsFund > > > TeamBean > Session > TeamHome > Team > > >
Re: Client application Please Help
Thanks for your input Matt. I think that the ejb-jar.xml is correct, otherwise I would not be able to deploy the ejb. Thanks again, -Danno - Original Message - From: "Matt Brunner" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, October 06, 2000 12:38 AM Subject: Re: Client application Please Help > It seems that you just need to use the standard structure for your ejb jar and > client app jar files. > The ejb jar file structure is shown in the orion and cmp primers on > www.jollem.com -- and the > application client jar should be structured like this: > > app-client.jar > app-client.class > META-INF/ > application-client.xml > > > hope this helps > Matt > > > "Daniel C. DiCesare" wrote: > > > Frank, > > I checked out your example but I am continuing to experience problems. Here > > is what I have. I have included the script for my xml files below. > > > > I have deployed an EJB called Team onto Orion. It sits in a EAR file which > > within it has a Team.jar file. The JAR file contains the following: > > Team.class - ( remote interface ) > > TeamHome.class - ( home interface ) > > TeamEJB - ( EJB ) > > ejb-jar.xml - ( deployment descriptor ) > > > > I then created a team-client.jar which consists of the following: > > TeamClient.class - ( client ) > > application-client.xml - ( client xml ) > > > > In my TeamClient I attempt to connect to the TeamEJB as follows: > > Context ic = new InitialContext(); > > Object obj = ic.lookup( "TeamBean" ); > > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > > TeamHome.class ); > > > > When I try to run the client I get the following message: > > javax.naming.NamingException: Error reading application-client descriptor: > > No location specified and no suitable instance of the type 'Team' found for > > the ejb-ref TeamBean > > at > > com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext > > (JAX, Compiled Code) > > at > > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > > at > > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > > at javax.naming.InitialContext.init(InitialContext.java:226) > > at javax.naming.InitialContext.(InitialContext.java:182) > > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > > > Can you or anyone please advise as to what I am doing wrong? > > > > Thanks in advance. > > -Danno > > > > The ejb-jar.xml looks as follows: > > > > > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > > > > no description > > TeamEJB > > > > > > no description > > TeamBean > > TeamBean > > TeamHome > > Team > > TeamEJB > > Bean > > java.lang.Integer > > False > > > > A description for ResourceRefName > > jdbc/SF > > javax.sql.DataSource > > Container > > > > > > > > > > > > My application-client.xml file looks as follows: > > > > > Application Client 1.2//EN" > > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > > > SportsFund > > > > > > TeamBean > > Session > > TeamHome > > Team > > > > > > >
Re: Client application
Thanks Christain, I am not sure that this is the way that we should be connecting though I could see how it would might work. -Danno - Original Message - From: "Christian Eichinger" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, October 03, 2000 5:00 PM Subject: Re: Client application > Look at the example in ..\demo\rmi\RMIApp.java. It shows how > you can access the EJB-Server using its JNDI functionality. > > Christian > > > "Daniel C. DiCesare" wrote: > > > > Hello, > > I have an EJB which I need to invoke from a Java application. I am > > trying to create the Client jar file so that my application can invoke > > the EJB. I have not been able to do so. I had hoped to use the > > deployment tool that comes with Sun to create the client jar but I > > have not been able to do so. Can anyone advise on how I can create > > this jar or how I can connect a client app to utilize my EJB's. > > > > Thanks > > -Dan
Re: Client application
Frank, I followed your example and deployed the orion-primer application. I copied the necessary JAR's into my directory along with the jndi.properties file. I also copied the orion-primer-client.jar into my directory. I then ran the following java -classpath .:orion.jar:ejb.jar:jndi.jar:orion-primer-clinet.jar hello.client.HelloClient I got the following error: Exception in thread "main" java.lang.NoClassDefFoundError: hello/client/HelloClient Any idea? -Danno
Re: Client application Please Help
do you have the jndi.properties file in the classpath? if you just create an initial context by calling the no argument constructor you need to include that file in the classpath. luis On Thu, 5 Oct 2000, Daniel C. DiCesare wrote: > Frank, > I checked out your example but I am continuing to experience problems. Here > is what I have. I have included the script for my xml files below. > > I have deployed an EJB called Team onto Orion. It sits in a EAR file which > within it has a Team.jar file. The JAR file contains the following: > Team.class - ( remote interface ) > TeamHome.class - ( home interface ) > TeamEJB - ( EJB ) > ejb-jar.xml - ( deployment descriptor ) > > I then created a team-client.jar which consists of the following: > TeamClient.class - ( client ) > application-client.xml - ( client xml ) > > In my TeamClient I attempt to connect to the TeamEJB as follows: > Context ic = new InitialContext(); > Object obj = ic.lookup( "TeamBean" ); > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > TeamHome.class ); > > > > > > When I try to run the client I get the following message: > javax.naming.NamingException: Error reading application-client descriptor: > No location specified and no suitable instance of the type 'Team' found for > the ejb-ref TeamBean > at > com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext > (JAX, Compiled Code) > at > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > at > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > at javax.naming.InitialContext.init(InitialContext.java:226) > at javax.naming.InitialContext.(InitialContext.java:182) > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > > Can you or anyone please advise as to what I am doing wrong? > > Thanks in advance. > -Danno > > > > The ejb-jar.xml looks as follows: > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > no description > TeamEJB > > > no description > TeamBean > TeamBean > TeamHome > Team > TeamEJB > Bean > java.lang.Integer > False > > A description for ResourceRefName > jdbc/SF > javax.sql.DataSource > Container > > > > > > > > My application-client.xml file looks as follows: > > Application Client 1.2//EN" > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > SportsFund > > > TeamBean > Session > TeamHome > Team > > > >
RE: Client application Please Help
I bet you'll have to change ic.lookup("TeamBean") in to ic.lookup("comp:/java/env/TeamBean"), a bit depending on what's defined in your *.xml files. These files define the name under which the bean gets registered. "comp:/java/env/" is a fixed? prefix. Frank On Thursday, October 05, 2000 7:18 PM, Daniel C. DiCesare [SMTP:[EMAIL PROTECTED]] wrote: > Frank, > I checked out your example but I am continuing to experience problems. Here > is what I have. I have included the script for my xml files below. > > I have deployed an EJB called Team onto Orion. It sits in a EAR file which > within it has a Team.jar file. The JAR file contains the following: > Team.class - ( remote interface ) > TeamHome.class - ( home interface ) > TeamEJB - ( EJB ) > ejb-jar.xml - ( deployment descriptor ) > > I then created a team-client.jar which consists of the following: > TeamClient.class - ( client ) > application-client.xml - ( client xml ) > > In my TeamClient I attempt to connect to the TeamEJB as follows: > Context ic = new InitialContext(); > Object obj = ic.lookup( "TeamBean" ); > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > TeamHome.class ); > > > > > > When I try to run the client I get the following message: > javax.naming.NamingException: Error reading application-client descriptor: > No location specified and no suitable instance of the type 'Team' found for > the ejb-ref TeamBean > at > com.evermind.server.ApplicationClientInitialContextFactory.getInitialCon text > (JAX, Compiled Code) > at > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > at > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > at javax.naming.InitialContext.init(InitialContext.java:226) > at javax.naming.InitialContext.(InitialContext.java:182) > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > > Can you or anyone please advise as to what I am doing wrong? > > Thanks in advance. > -Danno > > > > The ejb-jar.xml looks as follows: > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > no description > TeamEJB > > > no description > TeamBean > TeamBean > TeamHome > Team > TeamEJB > Bean > java.lang.Integer > False > > A description for ResourceRefName > jdbc/SF > javax.sql.DataSource > Container > > > > > > > > My application-client.xml file looks as follows: > > Application Client 1.2//EN" > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > SportsFund > > > TeamBean > Session > TeamHome > Team > > >
Re: Client application Please Help
It seems that you just need to use the standard structure for your ejb jar and client app jar files. The ejb jar file structure is shown in the orion and cmp primers on www.jollem.com -- and the application client jar should be structured like this: app-client.jar app-client.class META-INF/ application-client.xml hope this helps Matt "Daniel C. DiCesare" wrote: > Frank, > I checked out your example but I am continuing to experience problems. Here > is what I have. I have included the script for my xml files below. > > I have deployed an EJB called Team onto Orion. It sits in a EAR file which > within it has a Team.jar file. The JAR file contains the following: > Team.class - ( remote interface ) > TeamHome.class - ( home interface ) > TeamEJB - ( EJB ) > ejb-jar.xml - ( deployment descriptor ) > > I then created a team-client.jar which consists of the following: > TeamClient.class - ( client ) > application-client.xml - ( client xml ) > > In my TeamClient I attempt to connect to the TeamEJB as follows: > Context ic = new InitialContext(); > Object obj = ic.lookup( "TeamBean" ); > _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, > TeamHome.class ); > > When I try to run the client I get the following message: > javax.naming.NamingException: Error reading application-client descriptor: > No location specified and no suitable instance of the type 'Team' found for > the ejb-ref TeamBean > at > com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext > (JAX, Compiled Code) > at > javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) > at > javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) > at javax.naming.InitialContext.init(InitialContext.java:226) > at javax.naming.InitialContext.(InitialContext.java:182) > at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) > > Can you or anyone please advise as to what I am doing wrong? > > Thanks in advance. > -Danno > > The ejb-jar.xml looks as follows: > > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > no description > TeamEJB > > > no description > TeamBean > TeamBean > TeamHome > Team > TeamEJB > Bean > java.lang.Integer > False > > A description for ResourceRefName > jdbc/SF > javax.sql.DataSource > Container > > > > > > My application-client.xml file looks as follows: > > Application Client 1.2//EN" > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > SportsFund > > > TeamBean > Session > TeamHome > Team > >
Re: Client application Please Help
Frank, I checked out your example but I am continuing to experience problems. Here is what I have. I have included the script for my xml files below. I have deployed an EJB called Team onto Orion. It sits in a EAR file which within it has a Team.jar file. The JAR file contains the following: Team.class - ( remote interface ) TeamHome.class - ( home interface ) TeamEJB - ( EJB ) ejb-jar.xml - ( deployment descriptor ) I then created a team-client.jar which consists of the following: TeamClient.class - ( client ) application-client.xml - ( client xml ) In my TeamClient I attempt to connect to the TeamEJB as follows: Context ic = new InitialContext(); Object obj = ic.lookup( "TeamBean" ); _TeamHome = ( TeamHome )PortableRemoteObject.narrow( obj, TeamHome.class ); When I try to run the client I get the following message: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'Team' found for the ejb-ref TeamBean at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.(InitialContext.java:182) at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code) Can you or anyone please advise as to what I am doing wrong? Thanks in advance. -Danno The ejb-jar.xml looks as follows: http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> no description TeamEJB no description TeamBean TeamBean TeamHome Team TeamEJB Bean java.lang.Integer False A description for ResourceRefName jdbc/SF javax.sql.DataSource Container My application-client.xml file looks as follows: http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> SportsFund TeamBean Session TeamHome Team
Re: Client application
Thanks for the response, I'll check it out. -Danno - Original Message - From: "Frank Eggink" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, October 03, 2000 4:07 PM Subject: RE: Client application > Late August (22/8) I posted a simple example on this mailing list: "An > example to connect to a remote client". If you look in the archives you'll > find it. Hope it works for you. > > Frank > > On Tuesday, October 03, 2000 8:42 AM, Daniel C. DiCesare > [SMTP:[EMAIL PROTECTED]] wrote: > > Hello, > > I have an EJB which I need to invoke from a Java application. I am trying > to create the Client jar file so that my application can invoke the EJB. I > have not been able to do so. I had hoped to use the deployment tool that > comes with Sun to create the client jar but I have not been able to do so. > Can anyone advise on how I can create this jar or how I can connect a > client app to utilize my EJB's. > > > > Thanks > > -Dan > > << File: ATT0.html >> > >
Re: Client application
Thanks for the response, I'll check it out. -Danno - Original Message - From: "Christian Eichinger" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, October 03, 2000 5:00 PM Subject: Re: Client application > Look at the example in ..\demo\rmi\RMIApp.java. It shows how > you can access the EJB-Server using its JNDI functionality. > > Christian > > > "Daniel C. DiCesare" wrote: > > > > Hello, > > I have an EJB which I need to invoke from a Java application. I am > > trying to create the Client jar file so that my application can invoke > > the EJB. I have not been able to do so. I had hoped to use the > > deployment tool that comes with Sun to create the client jar but I > > have not been able to do so. Can anyone advise on how I can create > > this jar or how I can connect a client app to utilize my EJB's. > > > > Thanks > > -Dan
Re: Client application
Look at the example in ..\demo\rmi\RMIApp.java. It shows how you can access the EJB-Server using its JNDI functionality. Christian > "Daniel C. DiCesare" wrote: > > Hello, > I have an EJB which I need to invoke from a Java application. I am > trying to create the Client jar file so that my application can invoke > the EJB. I have not been able to do so. I had hoped to use the > deployment tool that comes with Sun to create the client jar but I > have not been able to do so. Can anyone advise on how I can create > this jar or how I can connect a client app to utilize my EJB's. > > Thanks > -Dan begin:vcard n:Eichinger;Christian tel;work:+43 662 22 88 422 x-mozilla-html:FALSE url:www.salzburgresearch.at org:Salzburg Research Forschungsgesellschaft m.b.H.;SunTREC version:2.1 email;internet:[EMAIL PROTECTED] adr;quoted-printable:;;Jakob-Haringer-Str. 5/III=0D=0A;Salzburg;;5020;Austria fn:Christian Eichinger end:vcard
RE: Client application
Late August (22/8) I posted a simple example on this mailing list: "An example to connect to a remote client". If you look in the archives you'll find it. Hope it works for you. Frank On Tuesday, October 03, 2000 8:42 AM, Daniel C. DiCesare [SMTP:[EMAIL PROTECTED]] wrote: > Hello, > I have an EJB which I need to invoke from a Java application. I am trying to create the Client jar file so that my application can invoke the EJB. I have not been able to do so. I had hoped to use the deployment tool that comes with Sun to create the client jar but I have not been able to do so. Can anyone advise on how I can create this jar or how I can connect a client app to utilize my EJB's. > > Thanks > -Dan > << File: ATT0.html >>
Client application
Hello, I have an EJB which I need to invoke from a Java application. I am trying to create the Client jar file so that my application can invoke the EJB. I have not been able to do so. I had hoped to use the deployment tool that comes with Sun to create the client jar but I have not been able to do so. Can anyone advise on how I can create this jar or how I can connect a client app to utilize my EJB's. Thanks -Dan
Hung while client application using O-R Mapping and version problem?
Hi there, Can anybody answer me the following tiresome problem? 1. I try to use O-R mapping according to Orion How-to, exactly as the following: In CustomerEJB.java, add: public Set addressSet; public static final Class addressSet_type=com.FedEx.entity.customer.Address.class; public Set getAddressSet() { return addressSet; } public void setAddressSet(Set addressSet) { this.addressSet=addressSet; } In Customer.java, add: public Set getAddressSet() throws RemoteException; public void setAddressSet(Set addressSet) throws RemoteException; In the CustomerClient.java which calls "Set mySet=getAddressSet()" method, mySet.size() is correct, however, while I use the following code to retrieve the objects stored in mySet, it always hangs: Set set=customer.getAddressSet(); if (set==null) { System.out.println("Set is null??!!"); return; } else { System.out.println("Set is not null!!! size=" + set.size()); } Object[] o=set.toArray(); // o.length is correct. for (int i=0; ihttp://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
Orion client application on Solaris
When I try to run a simple console client application accessing an EJB, I get this error : __Proxy1 ERROR! Shared library ioser12 could not be found. Exception in thread "main" java.lang.UnsatisfiedLinkError: specialLoadClass at com.sun.corba.ee.internal.util.JDKClassLoader.loadClass(JDKClassLoader.java: 59) at com.sun.corba.ee.internal.util.JDKBridge.loadClassM(JDKBridge.java:269) at com.sun.corba.ee.internal.util.JDKBridge.loadClass(JDKBridge.java:109) at javax.rmi.CORBA.Util.loadClass(Util.java:216) at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:307) at at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObjec t.java:183) at at ApplicantClient.(ApplicantClient.java:22) at ApplicantClient.main(ApplicantClient.java:52) This is my jndi.properties file: java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont extFactory java.naming.provider.url=ormi://apsu.ocas.on.ca/bos java.naming.security.principal=admin java.naming.security.credentials=123 I tried putting libioser12.so in my PATH, but this did not work. I have orion.jar and j2ee.jar in my CLASSPATH. Thanks.
Client application
I have orion running on Solaris and have successfully created an EJB and Servlet application. I now want to write a Java Swing application running on my Windows machine that accesses this EJB running on Solaris. Do you have an example ot this ? What jar files do I need to include to do this ? I included : ejb.jar, jndi.jar, jaxp.jar and orion.jar from the orion directory. I get this error when I do the lookup : javax.xml.parsers.FactoryConfigurationError: com.sun.xml.parser.DocumentBuilderFactoryImpl at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory. java:80) at com.evermind.xml.d.getJavaxDocument(JAX) at com.evermind.xml.XMLUtils.getDocument(JAX) at com.evermind.server.XMLConfig.hj(JAX) at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (JAX)