Re: Client application Please Help

2000-10-09 Thread Daniel C. DiCesare
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.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@orionservercomTo: 
Orion-Interest orion-interest@orionservercomSubject: 
RE: Client application Please HelpDate: Fri, 6 Oct 2000 10:31:00 
-0400The correct lookup is "java:comp/env/TeamBean". I 
assume you're running you're clientoutside 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 
inserver.xml.-Original Message-From: 
Frank Eggink [mailto:[EMAIL PROTECTED]]Sent: 
Friday, October 06, 2000 8:05 AMTo: Orion-InterestSubject: 
RE: Client application Please HelpI bet you'll have 
to change ic.lookup("TeamBean") in 
toic.lookup("comp:/java/env/TeamBean"), a bit depending on what's 
defined inyour *.xml files.These files define the 
name under which the bean gets registered."comp:/java/env/" is a 
fixed? prefix.FrankOn 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 
filewhich  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-clientdescriptor:  No location specified and 
no suitable instance of the type 'Team' foundfor  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.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  descriptionno 
description/description  
display-nameTeamEJB/display-name  
enterprise-beans  
entity  
descriptionno description/description 
 
display-nameTeamBean/display-na

RE: Client application Please Help

2000-10-06 Thread Pantelis, Thomas
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/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
 descriptionno description/description
 display-nameTeamEJB/display-name
 enterprise-beans
 entity
 descriptionno description/description
 display-nameTeamBean/display-name
 ejb-nameTeamBean/ejb-name
 homeTeamHome/home
 remoteTeam/remote
 ejb-classTeamEJB/ejb-class
 persistence-typeBean/persistence-type
 prim-key-classjava.lang.Integer/prim-key-class
 reentrantFalse/reentrant
 resource-ref
 descriptionA description for ResourceRefName/description
 res-ref-namejdbc/SF/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/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-nameSportsFund/display-name
 description/description
 ejb-ref
 ejb-ref-nameTeamBean/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homeTeamHome/home
 remoteTeam/remote
 /ejb-ref
 /application-client
 





Re: Client application Please Help

2000-10-06 Thread Daniel C. DiCesare

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.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
descriptionno description/description
display-nameTeamEJB/display-name
enterprise-beans
  entity
descriptionno description/description
display-nameTeamBean/display-name
ejb-nameTeamBean/ejb-name
homeTeamHome/home
remoteTeam/remote
ejb-classTeamEJB/ejb-class
persistence-typeBean/persistence-type
prim-key-classjava.lang.Integer/prim-key-class
reentrantFalse/reentrant
resource-ref
   descriptionA description for ResourceRefName/description
   res-ref-namejdbc/SF/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/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-nameSportsFund/display-name
   description/description
   ejb-ref
ejb-ref-nameTeamBean/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homeTeamHome/home
remoteTeam/remote
   /ejb-ref
  /application-client
 
 







Re: Client application Please Help

2000-10-06 Thread Daniel C. DiCesare

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.init(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.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
descriptionno description/description
display-nameTeamEJB/display-name
enterprise-beans
  entity
descriptionno description/description
display-nameTeamBean/display-name
ejb-nameTeamBean/ejb-name
homeTeamHome/home
remoteTeam/remote
ejb-classTeamEJB/ejb-class
persistence-typeBean/persistence-type
prim-key-classjava.lang.Integer/prim-key-class
reentrantFalse/reentrant
resource-ref
   descriptionA description for ResourceRefName/description
   res-ref-namejdbc/SF/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/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-nameSportsFund/display-name
   description/description
   ejb-ref
ejb-ref-nameTeamBean/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homeTeamHome/home
remoteTeam/remote
   /ejb-ref
  /application-client
 






Re: Client application Please Help

2000-10-06 Thread Daniel C. DiCesare
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.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@orionservercomTo: 
Orion-Interest orion-interest@orionservercomSubject: 
RE: Client application Please HelpDate: Fri, 6 Oct 2000 10:31:00 
-0400The correct lookup is "java:comp/env/TeamBean". I assume 
you're running you're clientoutside 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 
inserver.xml.-Original Message-From: 
Frank Eggink [mailto:[EMAIL PROTECTED]]Sent: 
Friday, October 06, 2000 8:05 AMTo: Orion-InterestSubject: RE: 
Client application Please HelpI bet you'll have to 
change ic.lookup("TeamBean") in toic.lookup("comp:/java/env/TeamBean"), 
a bit depending on what's defined inyour *.xml 
files.These files define the name under which the bean gets 
registered."comp:/java/env/" is a fixed? 
prefix.FrankOn 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 
filewhich  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-clientdescriptor:  No location specified and no 
suitable instance of the type 'Team' foundfor  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.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  descriptionno 
description/description  
display-nameTeamEJB/display-name  
enterprise-beans  
entity  
descriptionno description/description 
 
display-nameTeamBean/display-name 
 
ejb-nameTeamBean/ejb-name 
 
homeTeamHome/home 
 
remoteTeam/remote 
 
ejb-classTeamEJB/ejb-class 
 
persistence-typeBean/persistence-type 
 
prim-key-classjava.lang.Integer/prim-key-class 
 
reentrantFalse/reentrant 
 resource-ref  
descriptionA description for ResourceRefName/description 
 res-ref-namejdbc/SF/res-ref-name  
res-typejavax.sql.DataSource/res-type  
res-authContainer/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-nameSportsFund/display-name  
description/description  
ejb-ref  
ejb-ref-nameTeamBean/ejb-ref-name  
ejb-ref-typeSession/ejb-ref-type  
homeTeamHome/home  
remoteTeam/remote  /ejb-ref 
 /application-client 

  - Original Message - 
  From: 
  Pantelis, 
  Thomas 
  To: Orion-Interest 
  Sent: Friday, October 06, 2000 3:31 
  PM
  Subjec

Re: Client application Please Help

2000-10-06 Thread Daniel C. DiCesare

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.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
descriptionno description/description
display-nameTeamEJB/display-name
enterprise-beans
  entity
descriptionno description/description
display-nameTeamBean/display-name
ejb-nameTeamBean/ejb-name
homeTeamHome/home
remoteTeam/remote
ejb-classTeamEJB/ejb-class
persistence-typeBean/persistence-type
prim-key-classjava.lang.Integer/prim-key-class
reentrantFalse/reentrant
resource-ref
   descriptionA description for ResourceRefName/description
   res-ref-namejdbc/SF/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/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-nameSportsFund/display-name
   description/description
   ejb-ref
ejb-ref-nameTeamBean/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homeTeamHome/home
remoteTeam/remote
   /ejb-ref
  /application-client







Re: Client application Please Help

2000-10-05 Thread Daniel C. DiCesare

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.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
  descriptionno description/description
  display-nameTeamEJB/display-name
  enterprise-beans
entity
  descriptionno description/description
  display-nameTeamBean/display-name
  ejb-nameTeamBean/ejb-name
  homeTeamHome/home
  remoteTeam/remote
  ejb-classTeamEJB/ejb-class
  persistence-typeBean/persistence-type
  prim-key-classjava.lang.Integer/prim-key-class
  reentrantFalse/reentrant
  resource-ref
 descriptionA description for ResourceRefName/description
 res-ref-namejdbc/SF/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/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-nameSportsFund/display-name
 description/description
 ejb-ref
  ejb-ref-nameTeamBean/ejb-ref-name
  ejb-ref-typeSession/ejb-ref-type
  homeTeamHome/home
  remoteTeam/remote
 /ejb-ref
/application-client




Re: Client application Please Help

2000-10-05 Thread Matt Brunner

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.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
   descriptionno description/description
   display-nameTeamEJB/display-name
   enterprise-beans
 entity
   descriptionno description/description
   display-nameTeamBean/display-name
   ejb-nameTeamBean/ejb-name
   homeTeamHome/home
   remoteTeam/remote
   ejb-classTeamEJB/ejb-class
   persistence-typeBean/persistence-type
   prim-key-classjava.lang.Integer/prim-key-class
   reentrantFalse/reentrant
   resource-ref
  descriptionA description for ResourceRefName/description
  res-ref-namejdbc/SF/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/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-nameSportsFund/display-name
  description/description
  ejb-ref
   ejb-ref-nameTeamBean/ejb-ref-name
   ejb-ref-typeSession/ejb-ref-type
   homeTeamHome/home
   remoteTeam/remote
  /ejb-ref
 /application-client