• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Following HFEJB example app step by step, and getting a NoInitialContextException?

 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the exception which i get, but i don't understand why. I have reffered to the errata and corrected the small issue concerning the name of the business method.


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(AdviceClient.java:27)
at AdviceClient.main(AdviceClient.java:11)


Thanks.
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search this forum with the search string "NoInitialContextException" and you'll get a lot of posts on this topic.

Here are a few of them.
Starting EJB..JNDI exception

HF-EJB - initial context in chapter 1

AdviceClient Solution

Hope this helps.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic