3 Replies Latest reply on Jan 20, 2012 6:07 AM by yvsailaja

    Class loader isolation for WAR

    yvsailaja

      I am migrating my application from JBOSS 4.2.3 to JBOSS 6.1. My app ear contains axis war. Deployment is failing with the following error.

       

      Caused by: java.lang.RuntimeException: Error visiting resource: VFSResourceContext @ 1.0/com/sun/codemodel/JBreak.class / BaseClassLoader@1ec68e9{vfs:///E:/Jboss6/jboss-6.1.0.Final/server/default/deploy/GSS-EAR-JBoss.ear/axis2.war/}, visitor: org.jboss.scanning.hierarchy.plugins.HierarchyTypeVisitor@503710

                at org.jboss.scanning.plugins.visitor.IgnoreSetErrorHandler.handleError(IgnoreSetErrorHandler.java:56) [:1.0.0.GA]

       

      I tried added jboss-classloading.xml with the following

       

      <classloading xmlns="urn:jboss:classloading:1.0"

                    name="axis2.war"

                    domain="DefaultDomain"

                                    parent-domain="Ignored"

                    export-all="NON-EMPTY"

                    import-all="true">

      </classloading>

       

      But not able to fix the problem.  I tried various changes to this configuration. But no use.

       

      How to make JBoss use the libraries included in my war file. I read in some post that deleting will solve the problem. I tried that. I got classcastexception.

      Can any one please help me in solving this issue.

        • 1. Re: Class loader isolation for WAR
          alesj

          I've seen this issue before, at least this weird resource with 1.0 at the start. Check how it was dealt before.

          But I guess you could ignore this exception by adding to IgnoreSetErrorHandler's set of ignored exceptions -- check where IgnoreSerErrorHandler is defined in -jboss-beans.xml file.

          • 2. Re: Class loader isolation for WAR
            alesj

            for .war, child-first delegation should already work. But it depends how it's used, as you can see, it's not bullet proof.

            • 3. Re: Class loader isolation for WAR
              yvsailaja

              Thanks Ales for your quick response. I tried adding the exception in the IgnoreSetErrorHandler. It didn't fix the problem :-(.

               

              I read different posts related to this issue. Tried various configurations mentioned in them. But could not resolve the problem. Deleting the jax-rpc, jax-impl jar files solved the class not found exception. But gave another exception.