Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Edward Mond

+ Follow
since Nov 17, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Edward Mond

I have this working in linux J2EE 1.3 without a problem. I checked the erata at for the HeadFirst EJB book, but nothing there.
Also, I don't have the same directory structure as they say in the book. Not that it matters, but it is a little different.
Also, I tagged the jar files for the client in FRONT of the CLASSPATH. Doesn't make much sense to tack them onto the end, especially if you have a lot of garbage in it. See my command line below...
Also, If I take j2ee.jar out of my path I get simular garbage to what you get....
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(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.getURLOrDefaultInitCtx(
at javax.naming.InitialContext.lookup(
at AdviceClient.go(
at AdviceClient.main(

//here is is working...
[ed@top advice]# javac -classpath j2ee.jar/usr/java/j2ee/tutorial/examples/ears/AdviceAppClient.jar:${CLASSPATH}
[ed@top advice]# java -cp /usr/java/j2ee/tutorial/examples/ears/AdviceAppClient.jar:${CLASSPATH} AdviceClient
Eat it or flick it out the window!
[ed@top advice]# java -cp /usr/java/j2ee/tutorial/examples/ears/AdviceAppClient.jar:${CLASSPATH} AdviceClient
Where is the love?