Code:
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.ejs.ns.jndi.CNInitialContextFactory");
env.put(javax.naming.Context.PROVIDER_URL,
"iiop://192.168.1.100:900");
javax.naming.InitialContext context = new
javax.naming.InitialContext(env);
myBeanHome home =
(myBeanHome)PortableRemoteObject.narrow(context.lookup("myBean"),
myBeanHome.class);
Is there any WebShpere configuring I have to do to make "IIOP"
work?
Thanks in advance.
I was having some similar errors to what you describe on 4.0. When I
updated the install to use the Fix Pack 2 for the EJB fixes, the problem was
resolved. You may check to ensure you have all the fixpacks installed for
3.5.
Good luck,
Lorinda
<Fun...@hello.net> wrote in message
news:q8u9auo81bf83gk8g...@4ax.com...
Hi , i am also using was 4.0 as application server and tomcat as a
JSP engine ,while i am making lookup to EJB's resids in WAS i am
getting the following error.
/***
javax.naming.ServiceUnavailableException: NULL returned when resolving
initial reference=NameService
at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtxFactory.java:452)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:337)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:200)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.(InitialContext.java:198)
at jsp._0002fjsp_0002fClient_0002ejspClient_jsp_16._jspService(_0002fjsp_0002fClient_0002ejspClient_jsp_16.java:74)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
***/
I put EJB jar file at clients class path also..
My code is like this...
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
parms.put(Context.PROVIDER_URL,"iiop://127.0.0.1:900");
Context ctx = new InitialContext(parms);
com.gtl.gqw.client.ClientHome home=(ClientHome)
ctx.lookup("com/gtl/gqw/client/ClientHome");
Please any body can help me in this..thanks..
sagar