2 Replies Latest reply on Jan 15, 2003 12:13 PM by rdefalco

    Classloading problems and libraries versions management in J

    rdefalco

      Hello,
      I try to deploy an application ear that comes with log4j in a different version that the one wich is part of jboss 3.0.4. I think i've read extensiveley all the posts including the one saying you MUST use log4j as it is in jboss.
      So, what should i do ? Should I re-pacakge my application SPECIFIC to jboss because of the use of log4j Vxxx by jboss ? What if my application use a newer version of log4j ?
      This must be a recurrent problem, because log4j is widely used by many j2ee applications. I found a little hard to have to deal with it, specific this way, because jboss is using log4j! By the way, what for the other shared libs that are used by jboss ? Same cause, same punishment ?
      More generally: how Jboss address issues pointed in "classloading problems" chapter of this article : http://www2.theserverside.com/resources/articles/AdvancedClassLoading/article.html (IONA approach).

      Thanks,

      Richard

        • 1. Re: Classloading problems and libraries versions management
          h2o_polo

          I have never tried it but you can scope the classes for your ear.

          to do it you would need to create jboss-app.xml and put it in META-INF of your ear with the following (quoted from "Jboss Administration & Development" book):

          <jboss-app>
          <loader-repository>some.dot.com:loader=webtest.ear</loader-repository>
          </jboss-app>

          if the syntax does not work (which it might not) take a look at the dtd for details.

          • 2. Re: Classloading problems and libraries versions management
            rdefalco

            Hello,
            i've got the docs and i've already tried this but it didn't solve the problem. It permits to have different versions of the same libraries in different j2ee apps. But, the parent classloader is still under jboss... which use his own log4j classes. Because of this you cannot load a different version of this classes in your own ear with this option... or i misunderstood something. Any other ideas ?

            Richard