2 Replies Latest reply on Feb 14, 2013 6:57 AM by Rahul Razdan

    java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/context/FacesContext

    Rahul Razdan Newbie

      hi,

       

      even after reading this https://community.jboss.org/wiki/WhatsTheCauseOfThisExceptionJavalangClassFormatErrorAbsentCode#comment-11568

       

      m using the 2nd solution but still getting same error . earlier i was using

       

      <dependency>

                                    <groupId>javax</groupId>

                                    <artifactId>javaee-api</artifactId>

                                    <version>6.0</version>

      </dependency>

       

      now m using

       

      <dependency>

                                    <groupId>org.jboss.arquillian.junit</groupId>

                                    <artifactId>arquillian-junit-container</artifactId>

                                    <scope>test</scope>

      </dependency>

       

      <dependency>

                                    <groupId>org.jboss.arquillian.protocol</groupId>

                                    <artifactId>arquillian-protocol-servlet</artifactId>

                                    <scope>test</scope>

      </dependency>

      <dependency>

                                    <groupId>org.jboss.spec</groupId>

                                    <artifactId>jboss-javaee-6.0</artifactId>

                                    <type>pom</type>

                                    <scope>provided</scope>

      </dependency>

       

      my exception is :-

       

       

      WARN  [org.jboss.modules] (MSC service thread 1-8) Failed to define class javax.faces.context.FacesContext in Module "deployment.xxx-ee.ear.xxx-core-0.0.1-SNAPSHOT.jar:main" from Service Module Loader: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/context/FacesContext

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

                at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0]

                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0]

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

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

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

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

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

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

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

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

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

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

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

                at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0]

                at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0]

                at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [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]

                at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [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:1110) [rt.jar:1.7.0]

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

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

       

       

      11:47:29,583 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.subunit."xxx-ee.ear"."xxx-core-0.0.1-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."xxx-ee.ear"."xxx-core-0.0.1-SNAPSHOT.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "xxx-core-0.0.1-SNAPSHOT.jar" of deployment "xxx-ee.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:1110) [rt.jar:1.7.0]

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

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

      Caused by: java.lang.RuntimeException: Error getting reflective information for class com.xxx.seam.session.yyy.xxx with ClassLoader ModuleClassLoader for Module "deployment.xxx-ee.ear.xxx-core-0.0.1-SNAPSHOT.jar:main" from Service Module Loader

                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.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)

                at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)

                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.NoClassDefFoundError: Ljavax/faces/context/FacesContext;

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

                at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0]

                at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0]

                at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [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]

                ... 10 more

      Caused by: java.lang.ClassNotFoundException: javax.faces.context.FacesContext from [Module "deployment.xxx-ee.ear.xxx-core-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]

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

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

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

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

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

                ... 15 more

       

       

      any help will be greatly appriciated .

       

      Thanks