Hi,
I am trying out the example in Chapter 1 of the Head First
EJB book. I got everything working except the last step. It is unable to find the JNDI context. I specified the context as "Advisor", both on the server and in my AdviceClient.java file.
This is the error:
C:\projects\advice>
java AdviceClient
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(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:14)
C:\projects\advice>
Does anyone know what I'm missing?
Thanks,
Irshad Ahmed