Posted By:
Anonymous
Posted On:
Monday, April 23, 2001 04:29 AM
While access EJB-CMP deployed on WebSphere_5.1 i am getting Naming Exception as below Context Exception javax.naming.NamingException: Error during resolve [Root exception is java.lang.NullPointerException] I have set the properties object as below Properties env = System.getProperties(); env.put(Context.PROVIDER_URL, "iiop://localhost:900"); env.put( Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory"); env.put( "org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB"); Context ctx = new InitialContext( env ); System.out.println( ctx.lookup("EventsMasterList") ) ;
More>>
While access EJB-CMP deployed on WebSphere_5.1 i am getting Naming Exception as below
Context Exception javax.naming.NamingException: Error during resolve [Root exception is java.lang.NullPointerException]
I have set the properties object as below
Properties env = System.getProperties();
env.put(Context.PROVIDER_URL, "iiop://localhost:900");
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory");
env.put( "org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");
Context ctx = new InitialContext( env );
System.out.println( ctx.lookup("EventsMasterList") ) ;
Object objref = (EventsMasterHome) ctx.lookup("EventsMasterList");
the JNDI name of the EJB-CMP is correct. the same EJB-CMP is being accesed by a Servlet and JSP but not with simple java application. please anyone let me know the reason.
<<Less