3 Replies Latest reply on Dec 15, 2014 4:43 AM by Jay SenSharma

    Linkage error servlet-api.jar jboss 6.1

    mrutyunjay singh Newbie

      I am trying to migrate application from jboss 5.2 to jboss 6.1. I have tried both the servlet-api.jar provided by jboss 5.2 and jboss 6.1 eap. I am getting following linkage error while publishing and deploying the war file.

       

       

      17:24:30,715 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "snet.war" (runtime-name: "snet.war")
      17:24:30,927 WARN  [org.jboss.modules] (MSC service thread 1-3) Failed to define class com.ge.appl.tsf.shells.web.TSFDispatcher in Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base)): java.lang.LinkageError: Failed to link com/ge/appl/tsf/shells/web/TSFDispatcher (Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base)))
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:427) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [rt.jar:1.6.0_16]
      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_16]
      at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_16]
      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.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      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_16]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_16]
      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]
      Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [rt.jar:1.6.0_16]
      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1]
      ... 38 more
      Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet from [Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base))]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      ... 42 more

      17:24:30,929 WARN  [org.jboss.modules] (MSC service thread 1-3) Failed to define class issnet.actions.admin.EnvironmentSetterTSFDispatcher in Module "deployment.snet.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link com/ge/appl/tsf/shells/web/TSFDispatcher (Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base)))
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:427) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [rt.jar:1.6.0_16]
      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_16]
      at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_16]
      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.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      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_16]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_16]
      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]
      Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [rt.jar:1.6.0_16]
      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1]
      ... 38 more
      Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet from [Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base))]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      ... 42 more

      17:24:30,931 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."snet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."snet.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "snet.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_16]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_16]
      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]
      Caused by: java.lang.LinkageError: Failed to link com/ge/appl/tsf/shells/web/TSFDispatcher (Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base)))
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:427) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [rt.jar:1.6.0_16]
      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_16]
      at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_16]
      at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85)
      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.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      ... 5 more
      Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
      at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_16]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [rt.jar:1.6.0_16]
      at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1]
      ... 38 more
      Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet from [Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base))]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_16]
      ... 42 more

      17:24:30,941 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "snet.war" was rolled back with the following failure message:
      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"snet.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"snet.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"snet.war\"
          Caused by: java.lang.LinkageError: Failed to link com/ge/appl/tsf/shells/web/TSFDispatcher (Module \"com.snet:main\" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\\jboss-eap-6.1\\modules,D:\\jboss-eap-6.1\\modules\\system\\layers\\base)))
          Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
          Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet from [Module \"com.snet:main\" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\\jboss-eap-6.1\\modules,D:\\jboss-eap-6.1\\modules\\system\\layers\\base))]"}}
      17:24:30,950 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment snet.war (runtime-name: snet.war) in 4ms

        • 1. Re: Linkage error servlet-api.jar jboss 6.1
          Jay SenSharma Master

          The Error indicates that your custom module "com.snet"  should have a dependency to the "javax.servlet.api"  module.

           

          Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet from [Module "com.snet:main" from local module loader @11563ff (finder: local module finder @1581593 (roots: D:\jboss-eap-6.1\modules,D:\jboss-eap-6.1\modules\system\layers\base))]
          
          
          
          
          

           

          So try adding the dependencies like following:

           

          <module xmlns="urn:jboss:module:1.1" name="com.snet">
              <dependencies>
                   .
                   .
                  <module name="javax.servlet.api" export="true"/>
              </dependencies>
          
          
          
          
          

           

          At the top of the error it is java.lang.LinkageError  which indicates that you might have placed some jars inside your application which is conflicting.  Means some classes might be getting loaded from you WAR or custom module "com.snet"  and some of the dependent classes are being loaded by different classloaders.

           

           

          1.   Do you have your own version of  servlet-api.jar by any chance (apart from the one shipped by JBoss)?    Do not package any other servlet-api.jar in your application or custom module "com.snet".  Just refer to the JBoss shipped  "javax.servlet.api"  module as mentioned above.

          2.   Can you paste/attach the list of JARs present inside your "snet.war/WEB-INF/lib"   

          3.   Also paste the "com/snet/main/module.xml"



          1 of 1 people found this helpful
          • 2. Re: Linkage error servlet-api.jar jboss 6.1
            mrutyunjay singh Newbie

            Hi,

                I was able to publish and deploy. Many Thanks.

            But I am facing another problem while Running the the application. The output is as.

             

            On the browser -

             

            java.lang.NullPointerException

            com.ge.appl.tsf.shells.web.TSFDispatcher.service(TSFDispatcher.java:152)

            javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

            On the console

             

            ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SNet].[Dispatcher]] (http-localhost/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet Dispatcher threw exception: java.lang.NullPointerException

            at com.ge.appl.tsf.shells.web.TSFDispatcher.service(TSFDispatcher.java:152) [tsf-base.2.4.FCS.jar:]

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

            at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]

             

             

            Please Help.

            • 3. Re: Linkage error servlet-api.jar jboss 6.1
              Jay SenSharma Master

              The above error is "NullPointerException" which is coming from  "com.ge.appl.tsf.shells.web.TSFDispatcher"  code ("TSFDispatcher" is extending "HttpServlet") you will need to check the line 152 of your "TSFDispatcher.java"  service() method in order to find out the cause of NullPointerException.