aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes AdviceClient and JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "AdviceClient and JNDI" Watch "AdviceClient and JNDI" New topic
Author

AdviceClient and JNDI

Richard Stigter
Greenhorn

Joined: Oct 29, 2005
Posts: 2
Hi,

I tried to get the example from chapter 1 running on XP professional.

I get an exception in the: Object o = ic.lookup("Advisor")

C:\projects\advice>java -cp C:\j2sdkee1.3.1\lib\j2ee.jar:AdviceAppClient.jar;. AdviceClient
start main...
after initial context...
javax.naming.NoInitialContextException: Need to specify class name in environmen
t or system property, or as an applet parameter, or in an application resource f
ile: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:22)
at AdviceClient.main(AdviceClient.java:11)

I don't know anymore.

Richard
Richard Stigter
Greenhorn

Joined: Oct 29, 2005
Posts: 2
Found it

C:\projects\advice>java -cp C:\j2sdkee1.3.1\lib\j2ee.jar;AdviceAppClient.jar;. AdviceClient

found it ; instead of : between the classpaths.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: AdviceClient and JNDI