User development,
A new message was posted in the thread "Calling EJB from servlet - EJB's
interface class not found":
http://community.jboss.org/message/521206#521206
Author : Mike Johnson
Profile :
http://community.jboss.org/people/micjohnson997
Message:
--------------------------------------------------------------
I have deployed several EJBs into an EAR on JBoss 6.0.0 M1. I then have a separate WAR
(not deployed inside the EAR) with a servlet that uses InitialContext.lookup() on the
remote name of the EJB. When doing this, I get a ClassNotFoundException for the interface
class, even though the interface class is inside a JAR in the WAR's WEB-INF/lib
directory. Here's the start of the stack trace:
javax.naming.NamingException: Could not dereference object [Root exception is
java.lang.RuntimeException: Can not find interface declared by Proxy in our CL +
org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@efdd6a]
at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1508)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:824)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
then of course there's a bunch more stuff, followed by:
Caused by: java.lang.ClassNotFoundException: <My interface class name>
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:406)
I've seen several posts talking about potential classloader issues, but I'm not
familiar with the JBoss class loading scheme, so I was hoping someone had written up some
good directions on how to correctly configure everything for calling an EJB from a WAR.
Thanks in advance,
Mike Johnson
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/521206#521206