Reputation: 1661
I just got handed over a project from another group. EJB session bean / web service. It deployed without any issue on JavaCAPS 6.
However, on Oralce Glassfish V3 (3.0.1 Build 22), when I deployed the jar file (Applicaton / EJB Module), it kept complaining certain external libraries (which is included in the jar), can not be found.
Error in annotation processing: java.lang.NoClassDefFoundError: org/apache/commons/vfs/FileSystemException|#]
The Apache VFS jar is in the jar, but it can't find it.
However, if i move the jar and its dependencies into $Glassfish home/domains/domain1/lib
Everything is fine.
What are we doing wrong here?
Thanks
Upvotes: 1
Views: 2811
Reputation: 4250
In v2.* the root level library jars of the ejb module supported but because of JAVA EE 6 security restriction, glasssfish V3.1 NOT supported jar libs within ejb-jar module(*.jar file) to deploy. So you could use compatibility=v2 property to deploy
For example;
asadmin {server_parameters} deploy --property compatibility=v2 {package}.jar
Workaround Note: in Glassfish V3.0 there is no support for compatibility property. Must upgrade V3.1 or put libs to {GlassfishHome}/lib directory
Upvotes: 2