Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI lookup function, Cant create Initial Context

 
John Jesunamam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using IRAD 6.0. Getting exception.

javax.naming.ConfigurationException: The property com.ibm.ws.naming.wsn.factory.initial is not set. The most likely cause is that the jar which contains the file com/ibm/websphere/naming/jndiprovider.properties cannot be found by the class loader.
at com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(WsnInitialContextFactory.java:192)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:110)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:675)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:257)
at javax.naming.InitialContext.init(InitialContext.java:233)
at javax.naming.InitialContext.<init>(InitialContext.java:209)


for the following code.

public static void main(String[] args) {
try {
java.util.Hashtable env = new java.util.Hashtable();
javax.naming.Context initialContext;
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,
"corbaloc:iiop:localhost:2809");


initialContext = new javax.naming.InitialContext(env);

} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

Please help me.
 
John Jesunamam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to this technology, so any information would be helpfull. Please post any link to configure the JNDI service or samples, or any idea.

Thank you
 
John Jesunamam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nobody is a veteran in Websphere want to help me? Well I have few more quesitons. Anybody knows code behind dumpNameSpace?
 
Tim LeMaster
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the same problem as someone in the other thread where you suggested they add the correct JARs to the classpath. This application isn't running inside of the app server so the JARs for naming lookup need to be put on the classpath.
 
John Jesunamam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want the lookup to be in a standalone client similar to dumpNameSpace. I tried adding all the jars, no success till now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic