I've been learning
EJB with this book on EJB. I was able to create and deploy the Advisor bean using deploytool with 'Advisor' as JNDI Name (without the quotes). When I run the AdviceClient to invoke getAdvice() on the bean, I got
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
40)at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:280)at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:16) at AdviceClient.main(AdviceClient.java:10)
My J2EE 1.3 RI Server on Windows XP is running smoothly with this final message on the console
...
Loading jar:/C:/j2sdkee1.3.1/repository/master/applications/AdviceApp10828111758
34Server.jar
J2EE server startup complete.
The command that caused the error was -
java -cp AdviceAppClient.jar;c:\j2sdkee1.3.1\bin\j2ee.jar;d:\projects\java\advice AdviceClient
Any suggestions will be much appreciated.
oscar