2 Replies Latest reply on Nov 2, 2002 5:10 AM by juha

    3.0.3 Ear Classloader Bug

    yarrumretep

      Greetings,

      There appears to be a significant problem with the classloading logic for ear-files in 3.0.0 as it pertains to loading utility/library classes that are used both by EJBs and by WAR code. Different classes (depending on where they are accessed first) from the same package will load into different classloaders - causing exceptions when invoking package private methods between them.

      The attached mini-app displays this problem with a simple utility jar that contains two utility classes. When one is accessed by the EJB first and the other is accessed by the servlet first, they load into different classloaders.

      This behavior is found in 3.0.3 and is fatal for packaging to share library code.

      Is this a known issue and is someone working on it? Doesn anyone disagree that this is inappropriate behavior?

        • 1. Re: 3.0.3 Ear Classloader Bug
          ijcd


          We have confirmed this behavior. It seems that even though UnifiedClassLoaders use the same repository, the native java class loader does a security check that classes came from the same ClassLoader, not the same repository, so sharing by repository is a fatal flaw.

          Have you found a workaround for this?

          • 2. Re: 3.0.3 Ear Classloader Bug

            Yeah it's a problem and I don't know if there's a workaround to it.