4 Replies Latest reply on Jan 25, 2013 6:42 AM by Nicklas Karlsson

    java.lang.LinkageError: Failed to link org/apache/axis/transport/http/AxisServletBase

    Vivek Mittal Newbie

      Hi,

       

      As a part of migration of my application from IBM WAS to JBOSS, I am doing the configurational change for class loading:

       

      I have placed axis.jar in the modules --> app --> liberaries directory and placed an entry for the same in my standalone.xml.

       

      While reading the axis.jar its throwing the following messages:

       

      13:21:36,727 WARN  [org.jboss.modules] (MSC service thread 1-125) Failed to define class org.apache.axis.transport.http.AxisServletBase in Module "app.librerias:main" from local module loader @4aeaf40c (roots: C:\Users\invmittal\Downloads\jboss-as-7.2.0.Alpha1-SNAPSHOT\modules): java.lang.LinkageError: Failed to link org/apache/axis/transport/http/AxisServletBase (Module "app.librerias:main" from local module loader @4aeaf40c (roots: C:\Users\invmittal\Downloads\jboss-as-7.2.0.Alpha1-SNAPSHOT\modules))

      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.Module.loadModuleClass(Module.java:527) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]

      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_31]

      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_31]

      at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_31]

      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_31]

      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.Module.loadModuleClass(Module.java:527) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]

      at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_31]

      at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_31]

      at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)

      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]

      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]

      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

      Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_31]

      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_31]

      at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_31]

      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_31]

      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.3.GA]

      ... 35 more

      Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet from [Module "app.librerias:main" from local module loader @4aeaf40c (roots: C:\Users\invmittal\Downloads\jboss-as-7.2.0.Alpha1-SNAPSHOT\modules)]

      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]

      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]

      ... 41 more

       

      I am not really sure if these errors are because of the axis.jat I am using.

       

      This jar is working fine with the IBM WAS.. so, is it a possiblity that there is some different axis.jar for JBOSS?

      If yes, please guide me as to where from shall I get this..

       

      Also any inputs on the following question:

      If the jar is a different jar for JBOSS server, then this might have an impact on the existing code?

       

      Thanks

      Vivek

        • 1. Re: java.lang.LinkageError: Failed to link org/apache/axis/transport/http/AxisServletBase
          Nicklas Karlsson Master

          What happens if you add a dependency from the app.liberias module to javax.servlet.api ?

          • 2. Re: java.lang.LinkageError: Failed to link org/apache/axis/transport/http/AxisServletBase
            Vivek Mittal Newbie

            Hi Nicklas,

             

            I didn't understand how shall I achieve this.

             

            Could you please guide me as to how and what entry shall be made to the standalone.xml /module.xml?

            • 3. Re: java.lang.LinkageError: Failed to link org/apache/axis/transport/http/AxisServletBase
              Vivek Mittal Newbie

              ok.. I understood,

               

              I modified the module.xml by entering the javax.servlet.api.

               

              But now I am getting the following error:

               

              14:52:23,670 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-122) MSC00001: Failed to start service jboss.deployment.subunit."Test.ear"."TestWebServiceWeb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Test.ear"."TestWebServiceWeb.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "TestWebServiceWeb.war" of deployment "Test.ear"
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.3.GA.jar:1.0.3.GA]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.3.GA.jar:1.0.3.GA]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
              Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.apache.axis.transport.http.AxisServlet with ClassLoader ModuleClassLoader for Module "app.librerias:main" from local module loader @7eb1cc87 (roots: C:\Users\invmittal\Downloads\jboss-as-7.2.0.Alpha1-SNAPSHOT\modules)
              at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
              at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
              at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
              at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
              at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
              ... 5 more
              Caused by: java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
              at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_31]
              at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [rt.jar:1.6.0_31]
              at java.lang.Class.getDeclaredFields(Class.java:1743) [rt.jar:1.6.0_31]
              at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
              at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
              ... 10 more
              Caused by: java.lang.ClassNotFoundException: javax.xml.soap.SOAPException from [Module "app.librerias:main" from local module loader @7eb1cc87 (roots: C:\Users\invmittal\Downloads\jboss-as-7.2.0.Alpha1-SNAPSHOT\modules)]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]
              ... 15 more

              • 4. Re: java.lang.LinkageError: Failed to link org/apache/axis/transport/http/AxisServletBase
                Nicklas Karlsson Master

                while (ClassNotFoundException)

                {

                   hunt down module for class;

                   add module to dependencies;

                }