dcsimg
Havin problem in lookup of EJB
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abhinav_Srivastava
Posted On:   Tuesday, August 20, 2002 08:25 AM

I am using j2sdkee1.3.1 jdk1.4 The runClient works fine but i want to directly call the client code.. Using the following to prepare the InitialContext: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory"); p.put(Context.PROVIDER_URL, "iiop://localhost:9999"); and then.. ConverterHome home = (ConverterHome) ctx.lookup("java:comp/env/ejb/SimpleConverter"); and then it happens.. ****************************************************** javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound : IDL:omg.org/CosNaming/NamingContext/   More>>

I am using j2sdkee1.3.1
jdk1.4

The runClient works fine but i want to directly call the client code..
Using the following to prepare the InitialContext:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
p.put(Context.PROVIDER_URL, "iiop://localhost:9999");

and then..
ConverterHome home = (ConverterHome) ctx.lookup("java:comp/env/ejb/SimpleConverter");

and then it happens..
******************************************************
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
at org.omg.CosNaming._NamingContextExtStub.resolve(_NamingContextExtStub.java:400)
at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:443)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:495)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:473)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at ConverterClient.main(ConverterClient.java:36)

   <<Less

Re: Havin problem in lookup of EJB

Posted By:   kirk_guy  
Posted On:   Tuesday, August 20, 2002 08:46 AM

Make sure you have imported all the packages with regards to JNDI context and also check whether the server is running ?
About | Sitemap | Contact