title: Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacesServlet error in compilation
body: <p>I'm using eclipse Indigo and Tomcat 6.0.3 and JSF 2.0.</p>
  
  <p>I'm working from <a href="http://www.mkyong.com/jsf2/jsf-2-internationalization-example/" rel="nofollow noreferrer">this</a> example but I get these errors on runtime:</p>
  
  <pre><code>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:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
      at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:108)
      at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:58)
      at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1078)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4612)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1385)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
      at java.lang.Thread.run(Thread.java:680)
  </code></pre>
  
  <p>I have added all the <code>javaee-web-api</code>, <code>javax.faces-api</code> jars in maven dependency:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
    &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
    &lt;version&gt;3.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.oracle&lt;/groupId&gt;
    &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
    &lt;version&gt;11.2.0.2.0&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.8.2&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-jdbc&lt;/artifactId&gt;
    &lt;version&gt;7.0.19&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;tomcat&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-juli&lt;/artifactId&gt;
    &lt;version&gt;5.5.12&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;commons-lang&lt;/groupId&gt;
    &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
    &lt;version&gt;2.2&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;commons-codec&lt;/groupId&gt;
    &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
    &lt;version&gt;1.3&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;javax.faces&lt;/groupId&gt;
    &lt;artifactId&gt;javax.faces-api&lt;/artifactId&gt;
    &lt;version&gt;2.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
     &lt;groupId&gt;javax&lt;/groupId&gt;
     &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
     &lt;version&gt;6.0&lt;/version&gt;
     &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;commons-logging&lt;/groupId&gt;
    &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
    &lt;version&gt;1.1&lt;/version&gt;
    &lt;exclusions&gt;
      &lt;exclusion&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;/exclusion&gt;
    &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre>