Hi,


I'm going to use JBoss/Tomcat for production but want to use Resin for
development because Resin is much easier to test and develop servlets with.
However, I get an error when I call Handle.getEJBObject(). (Looking up, and
working with, Home interfaces works fine.)

This is the code in my test JSP:

        Object ref=new
javax.naming.InitialContext().lookup("java:comp/env/HelloEJB");
        HelloHome home=(HelloHome)ref; // Should use PortableRemoteObject.narrow(),
but casting also works with JBoss
        Hello hello=home.create(); // This works. The session bean is created.
        hello.getHandle().getEJBObject(); // This yields an error, see the
stacktrace below

This is the exception stacktrace:

java.rmi.ServerException: Could not get EJBObject; nested exception is:

        com.caucho.naming.NamingExceptionWrapper: java.lang.ClassNotFoundException:
com.sun.jndi.url.HelloEJB.HelloEJBURLContextFactory
java.lang.ClassNotFoundException:
com.sun.jndi.url.HelloEJB.HelloEJBURLContextFactory
        at
com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:390)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at com.caucho.util.CauchoSystem.loadClass(CauchoSystem.java:359)
        at com.caucho.naming.SchemeContext.getURLObject(SchemeContext.java:286)
        at com.caucho.naming.SchemeContext.lookup(SchemeContext.java:116)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessHandleImpl.getEJBObject(State
lessHandleImpl.java:48)
        at _hello__jsp._jspService(/hello.jsp:18)
        at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
        at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
        at com.caucho.jsp.Page.service(Page.java:398)
        at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:166)
        at com.caucho.server.http.Invocation.service(Invocation.java:272)
        at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
        at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
        at java.lang.Thread.run(Thread.java:484)

JBoss is linked to Resin's JNDI context this way: (This is Resin-specific
configuration.)

        <jndi-link>
                <jndi-name>java:comp/env</jndi-name>
                <jndi-factory>org.jnp.interfaces.NamingContextFactory</jndi-factory>
                <init-param java.naming.provider.url="localhost:1099"/>
        </jndi-link>

I sent a posting to the Resin interest list over a week ago and didn't get
any replies. Perhaps someone on this list help me out. Invoking
Handle.getEJBObject() in a standalone application works fine, BTW.


Regards
-Laurens


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to