3 Replies Latest reply on Aug 17, 2011 6:06 AM by Prasad Deshpande

    java.lang.NoClassDefFoundError: JMSException

    Red Militante Newbie

      I get a ClassNotFoundException when attempting to deploy my app - looks like it's not finding JMSException

       

      09:54:53,166 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."myapp-maventest.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp-maventest.war".INSTALL: Failed to process phase INSTALL of deployment "myapp-maventest.war"
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
              at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
              at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]
      Caused by: java.lang.RuntimeException: Error getting reflective information for class com.mycompany.myapp.common.jms.servlets.StationLogout
              at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
              at org.jboss.as.ee.component.EEModuleClassDescription$DefaultConfigurator.configure(EEModuleClassDescription.java:144)
              at org.jboss.as.ee.component.EEClassConfigurationProcessor.deploy(EEClassConfigurationProcessor.java:100)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
              ... 5 more
      Caused by: java.lang.NoClassDefFoundError: JMSException
              at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_26]
              at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_26]
              at java.lang.Class.getDeclaredMethods(Class.java:1791) [:1.6.0_26]
              at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65)
              at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
              ... 8 more
      Caused by: java.lang.ClassNotFoundException: JMSException from [Module "deployment.myapp-maventest.war:main" from Service Module Loader]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
              at org.jboss.modules.Conc
      

       

      JMSException is not in <jboss home>/modules/javax/jms .  I have this class in a jar file - javaee-api-6.0.jar .   I copied this jar file to <my app>/src/main/webapp/WEB-INF/lib , but I'm still receiving this ClassNotFoundException.

       

      Any advice on how to fix?  Thanks.

        • 1. Re: java.lang.NoClassDefFoundError: JMSException
          Prasad Deshpande Expert

          Are you

           

          Caused by: java.lang.RuntimeException: Error getting reflective information for class com.mycompany.myapp.common.jms.servlets.StationLogout         at

          This seems to be the main problem. Btw, how does your application looks like? Could you please paste the structure of your application?

          • 2. Re: java.lang.NoClassDefFoundError: JMSException
            Red Militante Newbie

            I'm not sure what you'd like me to check in my com...StationLogout class?  I interpreted that error to mean that the JMSException class is not being found? 

             

            JMSException is not in <jboss home>/modules/javax/jms .  I have this class in a jar file - javaee-api-6.0.jar .   I copied this jar file to <my app>/src/main/webapp/WEB-INF/lib , but I'm still receiving this ClassNotFoundException.  My next thought is that the javax.jms being loaded by as7 in /modules is conflicting with the javaee-api-6.0.jar that I'm trying to include in WEB-INF/lib.  Do I need to exclude the server's javax.jms in jboss-deployment-struture.xml ?

            • 3. Re: java.lang.NoClassDefFoundError: JMSException
              Prasad Deshpande Expert

              Red Militante wrote:

               

              JMSException is not in <jboss home>/modules/javax/jms .  I have this class in a jar file - javaee-api-6.0.jar .   I copied this jar file to <my app>/src/main/webapp/WEB-INF/lib

              JMSException is present in  <jboss_home>/modules/avax/jms/api/main/jboss-jms-api_1.1_spec-1.0.0.Final.jar file. You don't need to include javaee-api-6.0.jar when you are deploying your war file (It's probably only needed for compilation in your IDE). You can remove it from your deployment. If it's still persist, could you attach a sample app to this post that has this problem?