[jboss-user] [Installation, Configuration & Deployment] - classloader differences from 4.0.3.SP1 to 4.0.5.GA

paulsson do-not-reply at jboss.com
Thu Feb 22 00:42:46 EST 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020414#4020414

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020414



More information about the jboss-user mailing list