1 Reply Latest reply on Mar 8, 2012 9:51 AM by Yves Martin

    JBoss 5 - application's parent ClassLoader is null (always) ?

    Yves Martin Newbie



      I'm upgrading applications running over an in-house framework from JBoss4 to JBoss 5.1 and the framework gets the following trouble:
      in WAR context, warClassLoader.getParent() returns null
      whereas the framework expects to get a reference to the EAR ClassLoader which loads many EJB modules and Java modules (and includes also the WAR).


      For details, the framework behaves differently for EJB components and for Servlet components. Its configuration entries are stored in META-INF/MANIFEST.MF. When Thread ContextClassLoader is warClassLoader, it lists all META-INF/MANIFEST.MF visible (listWAR) and excludes resources coming from EAR jar files (listEJB) by querying manifest resources from warClassLoader.getParent(). So it gets Servlet configuration set as "listWAR - listEJB".


      JBoss 5.1 new ClassLoader layer now breaks this logic.


      Is there a simple way to get warClassLoader.getParent() returns the EAR ClassLoader reference ?


      I have tried classloading tags and metadata in WAR WEB-INF/lib/jboss-web.xml and WEB-INF/lib/jboss-classloading.xml without any success concerning "getParent" reference.


      Thank you in advance for your help.

      Yves Martin