Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advice Client problem

 
Peter Warde
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get the Advice Client running in Chapter 1 of HeadFirst EJB, but I keep getting the following error

javax.naming.noInitialContextException: Need to specify class name in environment or system property or as an applet parameter or as an application resource file.

I've looked at all the notes regarding changing the JNDI name from Test1 to Advisor, I'm running J2EE 1.3 and jsdk1.3.1_12 and I ain't getting no joy. The j2ee server starts up nicely and my bean verifies as correct in the deploy tool and deploys fine.I've compiled up the client as per the instructions in the book and run it as per the book.

What's up and can anyone help - Thanks Peter
 
Me
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter
I am not exactly sure but I guess you need to check if j2ee.jar is in your CLASSPATH?
Also make sure that you are deploying your bean with name "Advisor"
[ August 26, 2004: Message edited by: Muzammil Hussain ]
 
Peter Warde
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. Problem solved. Just for anyone else looking at this thread it was because the j2ee.jar file was not on the classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic