1 Reply Latest reply on Aug 22, 2005 1:12 PM by jwcone

    JBoss 3.2.3 Class-loading Problem

    jwcone Newbie

      Using JBoss-3.2.3, I have a WAR I'm trying to deploy with isolated classloading. In my jboss-web.xml, I have the following:

      <jboss-web>
       <class-loading java2ClassLoadingCompliance="false">
       <loader-repository>
       com.mydomain:loader=MyTestWar
       <loader-repository-config>
       java2ParentDelegation=false
       </loader-repository-config>
       </loader-repository>
       </class-loading>
      </jboss-web>
      

      Upon deployment, I get a java.lang.ClassCastException for each filter that is included in the web application. The error message is "Exception starting filter".

      My WAR's WEB-INF/lib directory includes the javax.servlet.jar file from JBOSS_HOME/server/default/lib. If I remove javax.servlet.jar from the WAR's WEB-INF/lib and deploy, then deployment works, but when I access the web application I get at NoClassDefFoundError for javax/servlet/http/HttpServletRequest. (Of course).

      So I'm having a classloading issue with javax.servlet.jar, but I'm not sure what I need to do to resolve the problem. Any help is appreciated.




        • 1. Re: JBoss 3.2.3 Class-loading Problem
          jwcone Newbie

          I got the isolated classloading to work with my web application.

          I used this jboss-web.xml:

          <jboss-web>
           <class-loading>
           <loader-repository>
           com.mydomain:loader=MyTestWar
           </loader-repository>
           </class-loading>
          </jboss-web>
          


          javax.servlet.jar is used when compiling, but is not included in the WAR.