This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem usin JNDI  RSS feed

nisu pathak
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello i have configured JNDI.i have configured java Mail session into glashfish server named mail/MyMailConfig.the code for sending mail using jndi is given below :

though i am getting following error even if i have configured Mail Session Properly ::

Exception in thread "main" 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 org.main.Main.runTest(
at org.main.Main.main(

please help me i am stuck with it..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!