This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Web Services and the fly likes issue in binding object to JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "issue in binding object to JNDI" Watch "issue in binding object to JNDI" New topic

issue in binding object to JNDI

Manish Shinde
Ranch Hand

Joined: Mar 30, 2011
Posts: 39

I am getting an exception while binding the object to JNDI.I missing some minute thing over here.
I am using Netbeans 6.5 and Tomcat 6.0.

Following is code.

I am getting Following Exception :
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 BindObject.main(

Thanks in advance
Lanny Gilbert
Ranch Hand

Joined: Jun 11, 2002
Posts: 104
It looks like your application is using some JNDI property that is not correctly configured (java:comp/env/), or your application is not running in the correct environment (perhaps an environment that does not support JNDI).
In what environment is your web service and your web service client running? Are they deployed on different machines?
I agree. Here's the link:
subject: issue in binding object to JNDI
It's not a secret anymore!