3 Replies Latest reply on Jun 4, 2008 11:44 AM by beyarecords

    java.lang.IllegalAccessError: class javax.xml.parsers.Securi

    beyarecords

      Hi,
      I am in the process of migrating my application from 4.0.3SP1 to 5.0.0.CR1, on Win XP SP1, and am receiving the following error message in the server logs when placing my WAR (Cocoon 2.1.8) into the deploy directory. It would seem that there is an issue concerning the xml-apis.jar/xml-apis-1.3.04 files situated within Cocoon.war/WEB-INF/lib(?):

      2008-06-04 01:09:54,796 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (main) Unexpected error during load of:javax.xml.parsers.SecuritySupport12
      java.lang.IllegalAccessError: class javax.xml.parsers.SecuritySupport12 cannot access its superclass javax.xml.parsers.SecuritySupport
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
       at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:502)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:462)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:460)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:437)
       at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
       at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
       at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
       at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
       at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:196)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1009)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:728)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:372)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.jboss.deployment.AnnotatedClassFilter.accepts(AnnotatedClassFilter.java:120)
       at org.jboss.deployment.AnnotatedClassFilter.visit(AnnotatedClassFilter.java:101)
       at org.jboss.virtual.plugins.vfs.helpers.WrappingVirtualFileHandlerVisitor.visit(WrappingVirtualFileHandlerVisitor.java:62)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:195)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:207)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:207)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:207)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:140)
       at org.jboss.virtual.VFS.visit(VFS.java:330)
       at org.jboss.virtual.VirtualFile.visit(VirtualFile.java:361)
       at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:170)
       at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:93)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1394)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:786)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:914)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:836)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:674)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:456)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:544)
       at java.lang.Thread.run(Thread.java:619)
      2008-06-04 01:09:54,921 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (main) Unexpected error during load of:javax.xml.transform.SecuritySupport12
      java.lang.IllegalAccessError: class javax.xml.transform.SecuritySupport12 cannot access its superclass javax.xml.transform.SecuritySupport
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
       at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:502)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:462)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:460)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:437)
       at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
       at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
       at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
       at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
       at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:196)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1009)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:728)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:372)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.jboss.deployment.AnnotatedClassFilter.accepts(AnnotatedClassFilter.java:120)
       at org.jboss.deployment.AnnotatedClassFilter.visit(AnnotatedClassFilter.java:101)
       at org.jboss.virtual.plugins.vfs.helpers.WrappingVirtualFileHandlerVisitor.visit(WrappingVirtualFileHandlerVisitor.java:62)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:195)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:207)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:207)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:207)
       at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:140)
       at org.jboss.virtual.VFS.visit(VFS.java:330)
       at org.jboss.virtual.VirtualFile.visit(VirtualFile.java:361)
       at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:170)
       at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:93)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1394)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:786)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:914)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:836)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:674)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:456)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:544)
       at java.lang.Thread.run(Thread.java:619)
      


      Many thanks in advance.

        • 1. Re: java.lang.IllegalAccessError: class javax.xml.parsers.Se
          beyarecords

          Hi,
          I came across the following piece of information:


          The servlet 2.3 spec says (9.6.2 Web Application Classloader):
          "The classloader that a container uses to load a servlet in a WAR must not
          allow the WAR to override JDK or Java Servlet API classes, and is recommended not to allow Servlets in the WAR visibility of the web containers implementation classes. If a web container has a mechanism for exposing container-wide library JARs to application classloaders, it is recommended that the application classloader be implemented in such a
          way that classes packaged within the WAR are able to override classes
          residing in containerwide
          library JARs."


          I have tried to move the 'suspected' jar's from WEB-INF\lib to server\default\lib but with no success. So how best to deal with this issue and why the change of functionality of the classloader in 5.0.0.CR1 from 4.0.3SP1?

          Many thanks in advance.

          • 2. Re: java.lang.IllegalAccessError: class javax.xml.parsers.Se
            peterj

            5.0 introduces a new classloader mechanism based on the virtual file system (VFS). Prior to 5.0 there was the unified classloader scheme. And yes, the VFS classloader is having its fair share of classloading issues, among them in beta4 it broke the isolation requirement for war files that you mentioned. Looks like it is still broke in trunk. Sigh.

            (It also broke classloader repository class scoping in beta3, which was still broke in beta4. If you dig through the forums, there were discussions about all of this earlier.)

            • 3. Re: java.lang.IllegalAccessError: class javax.xml.parsers.Se
              beyarecords

              Many thanks for the information, Peter. You have been most helpful and it is very much appreciated.

              I guess I'll hold off on the migration to 5.0.0.CR1, for the meantime ;-)