0 Replies Latest reply on Feb 22, 2007 12:42 AM by Erik Paulsson

    classloader differences from 4.0.3.SP1 to 4.0.5.GA

    Erik Paulsson Newbie

      Hello,

      I have noticed a difference between 4.0.3.SP1 and 4.0.5.GA classloaders for EARs that have WARs packaged inside of them. The problem affects where the classloader for the WAR looks for its classes.

      Under 4.0.3.SP1 I can package an EAR w/ the following structure (which works fine):

      EAR
       - xxx-ejb.jar
       - HAR
       - WAR
       - WEB-INF/lib/<jars only needed for WAR>
       - other JARs
      


      Under 4.0.5.GA this packaging structure does not work as the WAR cannot find the classes available in its own WEB-INF/lib dir. If I move these classes into the EAR alongsid the WAR and "other JARs" then the WAR's classloader can find them.

      Can someone explain to me why the classloader for a WAR file would not be able to find classes packaged in its own WEB-INF/lib dir? Why has this changed from 4.0.3.SP1 to 4.0.5.GA? Aactually, I think 4.0.4 acts the same as 4.0.5.GA also.
      As I understand it, when a WAR is packaged in an EAR a WARs classloader should first look in WEB-INF/lib and WEB-INF/classes, then at the JARs packaged in the EAR, and then at the JARs in JBOSS_HOME/server/<your_server_config>/lib.

      Any information regarding this would be much appreciated.

      Thanks,
      Erik