1 Reply Latest reply on Feb 25, 2013 3:48 AM by Nicklas Karlsson

    Classloader - Acessing jar file from another EAR

    flp05 Newbie

      Hi all,


      Here is a very resumed structure of my projet. I have two EARs which are always deployed together but they can't be merged.





      | - lib - ...

      |- web1.war

      |- ....




      |- lib  - java.jar

      | - web2.war

      | - ...



      I want to access, from web1.war to java.jar.


      However, I can't move "java.jar" to EAR1, because web2.war also needs javaproject.jar.

      Also, I can't copy "java.jar" to EAR1 becaus it is constantly changed and so, needs to be rebuilt on deploy.


      This is clearly a classloader misconfiguration. My fisrt reaction was to make EAR2 accessible from EAR1, by adding this to the manifest:

      Dependencies: deployment.EAR2.ear

      but this introduces some conflicts because EAR1 and EAR2 have many and many classes with the same packages, same names, same libs, etc...


      I also tried to add this to the manifest,

      Dependencies: deployment.SIGAE.ear.tasks.jar

      but also didn't suceeded because it gives me the error:

      New missing/unsatisfied dependencies



      Thank you all for your help.