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:20:41 PDT

Hello Sahoo,

sorry for the delay. I've downloaded http://dlc.sun.com.edgesuite.net/glassfish/v3.1/nightly/glassfish-v3_1-b01-05_21_2010.zip and tried it out. Unfortunately, though, the EJB still isn't listed in JNDI and I get the following NoClassDefFoundError when trying to access the EJB remote interface inside my servlet:

*********
[#|2010-05-27T13:53:37.940+0200|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=82;_ThreadName=Thread-1;|StandardWrapperValve[TestServlet]: PWC1406: Servlet.service() for servlet TestServlet threw exception
java.lang.NoClassDefFoundError: org/nightlabs/test/osgi/ejb/TestRemote
        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)
Caused by: java.lang.ClassNotFoundException: org.nightlabs.test.osgi.ejb.TestRemote
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
        at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 29 more
*********

Before, the following messages occur in the log, hence I'm sure that my EJB-OSGI-bundle (containing the missing class) is deployed:

*********
[#|2010-05-27T13:53:12.977+0200|INFO|glassfish3.1|null|_ThreadID=30;_ThreadName=Thread-1;|Installed /home/marco/java/glassfishv3.1_2010-05-21/glassfish/domains/lexware/autodeploy/bundles/org.nightlabs.test.osgi.ejb_1.0.0.jar|#]

[#|2010-05-27T13:53:12.978+0200|INFO|glassfish3.1|null|_ThreadID=30;_ThreadName=Thread-1;|Started bundle: file:/home/marco/java/glassfishv3.1_2010-05-21/glassfish/domains/lexware/autodeploy/bundles/org.nightlabs.test.osgi.ejb_1.0.0.jar|#]
*********

Here are the sources as well as the binary OSGI-bundles: http://nightlabs.de/~marco/glassfish/2010-05-27.00/

Am I doing anything wrong or is there still a bug in GlassFish?

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

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