1 Reply Latest reply on Mar 22, 2012 11:42 PM by r4_1314

    Jar deployment class loading

    r4_1314

      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

      https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7?focusedCommentId=22872411&#comment-22872411,

      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?