Hi,
I have an ejb jar with the following structure deploy to JBoss AS 7.1.0 final.
test.jar
|- a.class (ejb3.1)
|- b.jar
|-b.class
META-INF
|-MANIFEST.MF
There is no error throws in deployment. But java.lang.NoClassDefFoundError throws when I call a and the a invoke b.method(), even I added the b.jar in the Class-path of MANIFEST.MF.
Normally, jar or other resources such as xml, properties file in the top level should be accessible from the jar's classpath.
I've read this article
it said that the class loader was considerably different to previous versions of JBoss AS. it only mentioned the EAR class loading and WAR class loading, but no JAR class loading.
And I've read another article about SAR class loading
http://middlewaremagic.com/jboss/?p=1081
Assumed that this sample should work. It is quite similar to my situation. I followed the instruction to create a jboss-deployment-structure.xml inside the META-INF, but no luck.
I wonder if this a bug for a Jar class loading? If not, how can a access b?
I found this is a bug that not fix in the AS 7, however it provided a workaround to fix the problem. After tested, the workaround works.