0 Replies Latest reply on Sep 26, 2007 1:32 PM by alessandro_rizzi

    How to isolate my class from the lib jar

    alessandro_rizzi Newbie

      Problem: I need to use an old version of Hibernate3.jar but in JBoss 4.0.4 there is a new version that I do not want

      Solution 1: delete Hibernate3.jar from \lib folder. Works, but it's so ugly.

      I've tried to add in my jboss-app.xml:

      <loader-repository>
      jboss.test:loader=my.ear
      <loader-repository-config>
      java2ParentDelegation=true
      </loader-repository-config>
      </loader-repository>

      But, nothing changes, I see that \lib jar are seen before mine. (I've made a test class with same name but different behaviour in the \lib folder and in my ear folders and I see the \lib one)
      If I write java2ParentDelegation=true ... JBoss do not start at all, because during deploy of my.ear I need, of course, some of the \lib jars of JBoss.

      My .ear is somehow "strange" because I do have many subfolders and the path of them is written in the jboss-service.xml of the .sar (inside .ear), using the classpath tag.

      Thanks for any suggestion.
      Regards
      Alessandro Rizzi