1 Reply Latest reply on Aug 9, 2005 5:00 PM by majohnst

    Multiple Webapp Classloader Conflicts

    majohnst

      I am trying to deploy two webapps through the embedded Tomcat in JBoss 4.0.2 These webapps are based on WebWork and each has it's own xwork.xml file under WEB-INF/classes. WebWork reads in these files using Thread.currentThread().getContextClassLoader()

      I've looked over all the Classloader documentation including the http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases, but no matter what I do, the second webapp still loads in the file from the first app.

      In my tomcat jboss-service.xml I have

      <attribute name="Java2ClassLoadingCompliance">false</attribute>
       <attribute name="UseJBossWebLoader">false</attribute>


      And in both webapps jboss-web.xml I have
      <jboss-web>
       <class-loading java2ClassLoadingCompliance="false">
       <loader-repository>
       app1:loader=app1.war
      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
       </loader-repository>
       </class-loading>
       <virtual-host>ext.americanprofile.com</virtual-host>
      </jboss-web>


      Both apps are just slight variations of the same program, so I put all the JAR files under server/deploy/lib.

      Am I missing a step? Has anyone successfully gotten this type of configuration to work?

        • 1. Re: Multiple Webapp Classloader Conflicts
          majohnst

          I should add that whenever I use the JBoss UCL, the situation I described above happens. If I turn off the UCL, my webapp says it cannot find the "xwork.xml" file in the classpath, even though I have verified that the file exists in WEB-INF/classes