0 Replies Latest reply on Sep 11, 2012 8:38 AM by lucas_smith

    Classloaders in JBoss 4.2.2 GA

    lucas_smith

      Hi,

       

      I have two applications deployed:

      app1.ear and app2.ear.

       

      The second application has the following entry in jboss-app.xml:

      <jboss-app>

        <loader-repository>myPackage:archive=app1.ear</loader-repository>

      </jboss-app>

       

      Moreover there is the class called A in app1.ear and app2.ear. However the full name of the class is different.

      In app1.ear: myPackage.x.y.z.A

      In app2.ear myPackage.a.b.c.A

       

      I call a static field in app2.ear:

      A.FIELD (such field is available in app2.ear version of this class (in myPackage.a.b.c.A) - it is not defined in myPackage.x.y.z.A)

       

      Unfortunately I receive NoClassDefFoundError. It seems that classloader has loaded myPackage.x.y.z.A and it attempts to use it as myPackage.a.b.c.A.

       

      Is it possible? Can someone address my question?