users@glassfish.java.net

Re: EJB Client runs in Netbeans, but not outside

From: <glassfish_at_javadesktop.org>
Date: Sun, 11 Jul 2010 06:27:22 PDT

I had the same problem (NetBeans 6.8, Glassfish v3, JSE 6, JEE 6).

According to information found on the Web, I included in the project libraries javaee.jar and appserv-rt.jar from the Glassfish lib directory. The client connects to Glassfish from NetBeans but not outside it (class not found com.sun.enterprise.naming.serialInitContextFactory).

This class is supposed to exists in the appserv-rt.jar library. However, the latest version of this library are empty, containing just int he manifest file indirection to the libraries (.jar) located in the "lib/module" directory of the Glassfish installation. It seems that the indirection works when run from NetBeans but not outside.

In order to have it working, I added to the project libraries the two .jar files from Glassfish "lib" directory plus all the .jar files from Glassfish "lib/module" directory. And it worked !

I tried also to locate the missing classes and to add the libraries one by one, but I got some injection and linking errors I could not solve.

Maybe someone knows the minimum necessary set of libraries to add?

Hope it helps
[Message sent by forum member 'mdynca']

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