3 Replies Latest reply on Mar 1, 2013 1:18 PM by kazosman

    JBoss 7.1.1 Final - java.lang.NoClassDefFoundError: javax/interceptor/InvocationContext

    kazosman

      Hi

       

      I am a new to JBoss 7 and I am deploying my ear file on JBoss 7.1.1 Final and have the following in my jboss-deployment-structure.xml:

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

        <deployment>

                    <dependencies>

                      <module name="org.hibernate" export="true"/>

                      <module name="javax.faces.api" export="true" />

                <module name="com.sun.jsf-impl" export="true"/>

                <module name="org.dom4j" export="true"/>

                <module name="org.hibernate.validator" export="true"/>

                <module name="org.jsoup" export="true"/>

                <module name="org.jboss.common-core" export="true"/>

                <module name="org.hibernate.search" export="true"/>

                <module name="org.jboss.seam" export="true"/>

                <module name="javax.interceptor.api" export="true"/>

                    </dependencies>

        </deployment> 

      </jboss-deployment-structure>

       

      when i start the server I am getting:

       

      22:55:44,560 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."my-project-ear.ear"."my-project-ejb.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."my-project-ear.ear"."my-project-ejb.jar".INSTALL: Failed to process phase INSTALL of subdeployment "my-project-ejb.jar" of deployment "my-project-ear.ear"

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component ABCActionBean

                at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                ... 5 more

      Caused by: java.lang.RuntimeException: Error getting reflective information for class org.jboss.seam.intercept.SessionBeanInterceptor with ClassLoader ModuleClassLoader for Module "org.jboss.seam:main" from local module loader @84da22 (roots: /opt/5_PROJECTS/FMDJ_2013/jboss-as-7.1.1.Final/modules)

                at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.server.deployment.reflect.ClassReflectionIndexUtil.findMethod(ClassReflectionIndexUtil.java:52) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.server.deployment.reflect.ClassReflectionIndexUtil.findRequiredMethod(ClassReflectionIndexUtil.java:76) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator$2.handleInterceptorClass(ComponentDescription.java:699)

                at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator$2.handle(ComponentDescription.java:678)

                at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)

                at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:662)

                at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)

                ... 6 more

      Caused by: java.lang.NoClassDefFoundError: javax/interceptor/InvocationContext

                at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_15]

                at java.lang.Class.privateGetDeclaredMethods(Class.java:2451) [rt.jar:1.7.0_15]

                at java.lang.Class.getDeclaredMethods(Class.java:1810) [rt.jar:1.7.0_15]

                at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                ... 13 more

      Caused by: java.lang.ClassNotFoundException: javax.interceptor.InvocationContext from [Module "org.jboss.seam:main" from local module loader @84da22 (roots: /opt/5_PROJECTS/FMDJ_2013/jboss-as-7.1.1.Final/modules)]

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                ... 18 more

       

      .

      .

      .

      JBAS014775:    New missing/unsatisfied dependencies:

       

      Then everything gets rolled back

      I have already included the module that this class is part of but cannot seem to resolve this - please help

       

      Thanks

      Kaz

        • 1. Re: JBoss 7.1.1 Final - java.lang.NoClassDefFoundError: javax/interceptor/InvocationContext
          nickarls

          Strange, I think it should be included by default. Seam appear to be involved, what version are you running and what libs do you have in the ear lib?

          • 2. Re: JBoss 7.1.1 Final - java.lang.NoClassDefFoundError: javax/interceptor/InvocationContext
            kazosman

            Hi

             

            thanks for your message, I am using Seam version 2.3.0.Final

             

            The jars in the ear are:

             

            antlr-runtime.jar

            commons-beanutils.jar

            core.jar

            derby.jar

            drools-compiler.jar

            drools-core.jar

            drools-decisiontables.jar

            drools-templates.jar

            ecj.jar

            ehcache-core.jar

            fontbox.jar

            groovy-all.jar

            guava.jar

            hibernate-ehcache.jar

            jackrabbit-api.jar

            jackrabbit-jcr-commons.jar

            jackrabbit-spi.jar

            jackrabbit-spi-commons.jar

            jackrabbit-text-extractors.jar

            javase.jar

            jboss-el.jar

            jboss-seam-remoting.jar

            jbpm-jpdl.jar

            jempbox.jar

            jOpenDocument-1.2.jar

            knowledge-api.jar

            lucene-analyzers-3.6.2.jar

            lucene-core-3.6.2.jar

            mvel2.jar

            pdfbox.jar

            poi.jar

            poi-scratchpad.jar

            richfaces-components-api.jar

            richfaces-core-api.jar

             

            Thanks

            Kaz

            • 3. Re: JBoss 7.1.1 Final - java.lang.NoClassDefFoundError: javax/interceptor/InvocationContext
              kazosman

              Hi

               

              Just to update this - I have managed to solve the problem. It seems to be connected with hibernate search.

               

              I updated my jboss-deployment-structure.xml to:

               

              <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

                <deployment>

                            <dependencies>

                              <module name="org.hibernate" export="true"/>

                              <module name="javax.faces.api" export="true" />

                        <module name="com.sun.jsf-impl" export="true"/>

                        <module name="org.dom4j" export="true"/>

                        <module name="org.hibernate.validator" export="true"/>

                        <module name="org.jsoup" export="true"/>

                        <module name="org.jboss.common-core" export="true"/>

                        <module name="org.apache.commons.beanutils" export="true"/>

                        <module name="org.slf4j" export="true"/>

                        <module name="javax.faces.api" export="true"/>

                        <module name="javax.interceptor.api" export="true"/>

                        <module name="sun.jdk" export="true"/>

                        <module name="com.google.zxing" export="true"/>

                        <module name="com.google.guava" export="true"/>

                        <module name="org.jopendocument" export="true"/>

                            </dependencies>

                </deployment> 

              </jboss-deployment-structure>

               

              and have the following jars in the lib directory of my ear:

              antlr-runtime.jar

              derby.jar

              drools-compiler.jar

              drools-core.jar

              drools-decisiontables.jar

              drools-templates.jar

              ecj.jar

              ehcache-core.jar

              fontbox.jar

              groovy-all.jar

              hibernate-search-engine-4.2.0.Final.jar

              hibernate-search-orm-4.2.0.Final.jar

              jackrabbit-api.jar

              jackrabbit-jcr-commons.jar

              jackrabbit-spi.jar

              jackrabbit-spi-commons.jar

              jackrabbit-text-extractors.jar

              jboss-el.jar

              jboss-seam-remoting.jar

              jbpm-jpdl.jar

              jempbox.jar

              knowledge-api.jar

              lucene-analyzers-3.6.2.jar

              lucene-core-3.6.2.jar

              mvel2.jar

              pdfbox.jar

              poi.jar

              poi-scratchpad.jar

              richfaces-components-api.jar

              richfaces-core-api.jar

              solr-core-3.6.2.jar

              solr-solrj-3.6.2.jar

               

              and I forgot to mention earlier that jboss-seam.jar is located in the EarContent directory of my ear.

               

              thanks

              Kaz