java.lang.ClassFormatError: attributo Absent Code nel metodo che non è nativo o astratto nel file di class javax / faces / webapp / FacesServlet

Voglio usare Mojarra 2.1 con Tomcat 7, quindi ho aggiunto le seguenti dipendenze nel mio file pom:

 com.sun.faces jsf-api 2.1.2   com.sun.faces jsf-impl 2.1.2  

Tuttavia, quando ho provato ad avviare Tomcat, ho ottenuto la seguente eccezione:

 org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8007]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.startup.Catalina.start(Catalina.java:621) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) ... 7 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) ... 9 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) ... 11 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) ... 14 more Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacesServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2820) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523) at com.sun.faces.config.FacesInitializer.(FacesInitializer.java:107) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1543) at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1466) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1285) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) ... 17 more 

Come è causato e come posso risolverlo?

Ecco il mio file web.xml che potrebbe contenere la causa del problema:

   appName   org.springframework.web.context.ContextLoaderListener     org.springframework.web.context.request.RequestContextListener    contextConfigLocation  classpath:META-INF/spring/context.xml classpath:META-INF/spring/security.xml    javax.faces.PROJECT_STAGE Development   customers   State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2 javax.faces.STATE_SAVING_METHOD server   javax.servlet.jsp.jstl.fmt.localizationContext resources.application   com.sun.faces.config.ConfigureListener   javax.faces.FACELETS_SKIP_COMMENTS true    springSecurityFilterChain  org.springframework.web.filter.DelegatingFilterProxy    springSecurityFilterChain /*   Pretty Filter com.ocpsoft.pretty.PrettyFilter   Pretty Filter /* FORWARD REQUEST ERROR   Resource Servlet com.icesoft.faces.webapp.CompatResourceServlet 1   Resource Servlet /xmlhttp/*   Faces Servlet javax.faces.webapp.FacesServlet 1   Faces Servlet /faces/*