users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Mon, 31 May 2010 11:51:50 PDT

Hello Sahoo,

thanks a lot for your support! I used option #1 (already before) and I just tried it again, but I still get this error:

javax.naming.NameNotFoundException: org.nightlabs.test.osgi.ejb.TestRemote not found

Here's my log file: http://nightlabs.de/~marco/glassfish/2010-05-31.00/

I've done the following:

1) I undeployed the 2 bundle files.

2) I stopped GlassFish.

3) I set the logging level of the root and the "javax.enterprise.system.core.naming" category to "FINEST".

4) I deleted the old log files.

5) I started GlassFish via this command: ./asadmin start-domain lexware

6) To be absolutely sure, I test with the same file as you did, I downloaded the [url=http://nightlabs.de/~marco/glassfish/2010-05-27.02/org.nightlabs.test.osgi.ejb_1.0.0.jar]org.nightlabs.test.osgi.ejb_1.0.0.jar[/url] and saved it into ${glassfish}/glassfish/domains/lexware/autodeploy/bundles/

In the log file, it only says "installed" and "started" - but nothing about JNDI:

[#|2010-05-31T20:19:11.148+0200|INFO|glassfish3.1|null|_ThreadID=31;_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-31T20:19:11.150+0200|INFO|glassfish3.1|null|_ThreadID=31;_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|#]

7) I then downloaded [url=http://nightlabs.de/~marco/glassfish/2010-05-27.02/org.nightlabs.test.osgi.web_1.0.0.jar]org.nightlabs.test.osgi.web_1.0.0.jar[/url] and deployed it the same way. When accessing http://localhost:8080/test/TestServlet I get the javax.naming.NameNotFoundException in the log file (there are some other exceptions in the log, because the servlet tries to scan the complete JNDI tree - the said exception is the last in the log).

Btw. when you say "I can see the remote EJBs getting bound to JNDI." how do you see that? Do you use some JNDI browser (which seems to be missing in GlassFish 3 - at least it is not where I remember to have seen it in GlassFish 2)? Or do you see it in the log?

And is it correct that the EJB should be with the fully qualified name of its remote interface in JNDI (just as it is when it is non-OSGI-deployed)?

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

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