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.<init>(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/<app name>" where <app name> 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.<init>(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: > > > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise > > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > > > > <ejb-jar> > > <description>no description</description> > > <display-name>TeamEJB</display-name> > > <enterprise-beans> > > <entity> > > <description>no description</description> > > <display-name>TeamBean</display-name> > > <ejb-name>TeamBean</ejb-name> > > <home>TeamHome</home> > > <remote>Team</remote> > > <ejb-class>TeamEJB</ejb-class> > > <persistence-type>Bean</persistence-type> > > <prim-key-class>java.lang.Integer</prim-key-class> > > <reentrant>False</reentrant> > > <resource-ref> > > <description>A description for ResourceRefName</description> > > <res-ref-name>jdbc/SF</res-ref-name> > > <res-type>javax.sql.DataSource</res-type> > > <res-auth>Container</res-auth> > > </resource-ref> > > </entity> > > </enterprise-beans> > > </ejb-jar> > > > > > > > > My application-client.xml file looks as follows: > > <?xml version="1.0"?> > > <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE > > Application Client 1.2//EN" > > "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"> > > <application-client> > > <display-name>SportsFund</display-name> > > <description></description> > > <ejb-ref> > > <ejb-ref-name>TeamBean</ejb-ref-name> > > <ejb-ref-type>Session</ejb-ref-type> > > <home>TeamHome</home> > > <remote>Team</remote> > > </ejb-ref> > > </application-client> > >
|
Title: RE: Client application Please Help
- RE: Client application Please Help Frank Eggink
- Re: Client application Please Help Daniel C. DiCesare
- RE: Client application Please Help Pantelis, Thomas
- RE: Client application Please Help Daniel C. DiCesare
- RE: Client application Please Help Pantelis, Thomas
- Re: Client application Please Help Daniel C. DiCesare