Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TTjavax.naming.No Initial Context Exception  RSS feed

 
anbarasan radhakrishnan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i developed a bean and deployed it through console
and when i tried to run my client it is giving this error
error i'm getting
-----------------
TTjavax.naming.No InitialContext Exception: 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
:roll:
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the client code and tell us what application server you are using?
 
raman nanda
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah that would be helpful also you can try if you are using glassfish server to import javaee.jar and appserv-rt.jar for resolving the naming error when you make a standalone client.
Include these two files in addition to the beanclient generated by the container in the classpath
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!