2 Replies Latest reply on Apr 24, 2009 11:48 AM by Alt Avatar

    Disable WAR classloader isolation

    Alt Avatar Newbie

      Hello,

      I have 2 WARs contained in an EAR. I get the following error when I access any page in one of the webapps (note: the project uses JBoss Seam 2.1):

      [VFSScanner] Error handling item 'index.page.xml' java.lang.NullPointerException: Cannot find URL from classLoader for index.page.xml, loading from org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@1687250


      I'd like to see if this can be resolved by having both WARs share the same ClassLoader. I have tried using adding the following WEB-INF/jboss-web.xml file to both WARs:

      <jboss-web>
       <class-loading>
       <loader-repository>
       org.jboss:archive=shared
       </loader-repository>
       </class-loading>
      </jboss-web>


      But that hasnt helped. I've read that this configuration file may be ignored in AS5 as ClassLoading is delegated to Tomcat - is this correct? How can I configure JBoss AS 5 to use the same classloader for both WARs in my EAR?

      Moreover, will this approach work? I imagine that it may cause filename collision or other issues?

      Thanks very much.

        • 1. Re: Disable WAR classloader isolation
          jaikiran pai Master

           

          [VFSScanner] Error handling item 'index.page.xml' java.lang.NullPointerException: Cannot find URL from classLoader for index.page.xml, loading from org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@
          1687250

          Which exact version of AS5 do you use? I haven't seen that error or the class reporting that error before (i don't have a system where i can check for that class).

          How can I configure JBoss AS 5 to use the same classloader for both WARs in my EAR?


          See this http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153791#4224555

          • 2. Re: Disable WAR classloader isolation
            Alt Avatar Newbie

             

            "jaikiran" wrote:
            Which exact version of AS5 do you use? I haven't seen that error or the class reporting that error before (i don't have a system where i can check for that class).


            I've tried both AS 5.0.0 and AS 5.0.1

            I tried to do as you suggested in the other thread - setting the following property to true:

            %JBOSS_HOME%/server/< serverName>/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
            <property name="useJBossWebLoader">true</property>


            Unfortunately, I'm still seeing similar errors:

            WARN [VFSScanner] Error handling item 'index.page.xml': java.lang.NullPointerException: Cannot find URL from classLoader for index.page.xml, loading from org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@42b366


            Looks like the same ClassLoader is still being used?