Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

any soln for javax naming NoInitialContextException...?  RSS feed

 
sunil kumre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm trying to run sample JMS program using J2SEE1.3.1 server.For a sample PTP program when i try to send a message from a sender class the following error is occuring.
Can anyone help?
Thanks in advance.
Here is the exact error message--
JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify
class name in environment or system property, or as an applet parameter, or in a
n application resource file: java.naming.factory.initial
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I usually do when I need to run stuff outside of a container is find a copy of the jndi.properties file and put it on my classpath. Take a look in the J2EE_HOME/lib/j2ee.jar file for a copy.
Simon
 
ghiv tet
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Simon. Actually these things should be mentioned in the docs of the server for easy reference.
 
Soman Singh
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Simon,
I am new to JMS.
I was working the example "SimpleQueueSender.java" on wsad.
The program throws error " JNDI API lookup failed: javax.naming.CommunicationException: Can't find SerialContextProvider"
Any suggestion from you shall be helpful to me.
Thx in advance,
SOS
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!