java.lang.NoClassDefFoundError at javax.rmi.PortableRemoteObject.createDele
843793Aug 9 2005 — edited Aug 12 2005<p>Hello</p>
<pre>
We have one web application using EJB. we are getting one exception as
<Aug 9, 2005 2:16:40 PM IST> <Error> <HTTP> <101017> <[ServletContext(id=2156368,name=pm,context-path=/pm)] Root cause of Serv
letException
java.lang.NoClassDefFoundError
at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:177)
at javax.rmi.PortableRemoteObject.<clinit>(PortableRemoteObject.java:56)
at pm.util.EJBHomeFactory.lookupHome(EJBHomeFactory.java:74)
at pm.client.ValidateFleetHomeLocator.getValidateFleetHome(ValidateFleetHomeLocator.java:19)
at pm.client.ValidateFleetSessionBean.getFleetSessionBeanInstance(ValidateFleetSessionBean.java:20)
at pm.handler.PMHandler.isGEFleet(PMHandler.java:153)
at pm.Login.doGet(Login.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
>
</pre>
<pre>
We have deployed EJB jar.
the code is
String jndiName = ejbHomeClass.getName();
int cls = jndiName.lastIndexOf('.') + 1;
jndiName = jndiName.substring(cls, jndiName.lastIndexOf("Home"));
System.out.println("jndiName >>"+jndiName);
Object objref = new Object();
objref = ctx.lookup(jndiName);
System.out.println("objref >>"+objref );
System.out.println("ejbHomeClass "+ejbHomeClass);
ejbHome = (EJBHome)PortableRemoteObject.narrow(objref, ejbHomeClass);
ejbHomes.put(ejbHomeClass, ejbHome);
</pre>
<pre>
The code is throwing above exception at the belwo line<br>
ejbHome = (EJBHome)PortableRemoteObject.narrow(objref, ejbHomeClass);
</pre>
<p>
Please Help me in saving solving this problem<br>
Thanks in advance
Deepali
</p>