File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

AdviceClient and JNDI

Richard Stigter

Joined: Oct 29, 2005
Posts: 2

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(
at AdviceClient.main(

I don't know anymore.

Richard Stigter

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.

I agree. Here's the link:
subject: AdviceClient and JNDI
It's not a secret anymore!