users@glassfish.java.net

Re: _at_Remote EJB + JNDI supported in hybrid (JavaEE+OSGi) JAR?

From: <glassfish_at_javadesktop.org>
Date: Thu, 27 May 2010 05:32:03 PDT

Sorry, the NoClassDefFoundError was an error in my MANIFEST.MF (to be more precise an old version of the file, because there are 2 MANIFEST.MF in different locations (due to Eclipse managing OSGI projects differently than EJB projects)).

The exception is now this:

*********
[#|2010-05-27T14:13:24.645+0200|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=83;_ThreadName=Grizzly-8080(3);|StandardWrapperValve[TestServlet]: PWC1406: Servlet.service() for servlet TestServlet threw exception
javax.naming.NameNotFoundException: org.nightlabs.test.osgi.ejb.TestRemote not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:211)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:182)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:72)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:115)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:444)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at org.nightlabs.test.osgi.web.TestServlet.processRequest(TestServlet.java:68)
        at org.nightlabs.test.osgi.web.TestServlet.doGet(TestServlet.java:33)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1518)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:171)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:651)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:591)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:321)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:222)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:803)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:706)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:987)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:178)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:526)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:507)
        at java.lang.Thread.run(Thread.java:619)
*********

Here are the current sources and binaries: http://nightlabs.de/~marco/glassfish/2010-05-27.01/

As you'll see if you deploy my little test and go to http://localhost:8080/test/TestServlet the EJB does still not occur anywhere in JNDI (the servlet first lists all the JNDI contents before trying to lookup the EJB by its specific name).

Best regards, Marco :-)
[Message sent by forum member 'nlmarco']

http://forums.java.net/jive/thread.jspa?messageID=471693