java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file
I was running a Java Web Project in Netbeans 7.1. Earlier the project worked well, I was able to deploy and run the web application in Tomcat 7.0.22 from Netbeans 7.1
Suddenly, My project was not running. When tried to run in Netbeans, I got the following error.
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file
On Searching many forums, Everybody suggested to include javaee-api.6.0.jar file in compile time. But none were straight forward to do it in Netbeans.
Just tried to add the following jar files in Processor
javaee-api-6.0.jar
javaee-web-api-6.0.jar
How to add these Jar Files ?

Now You shall try running the Web Application from Netbeans.
Solution Reference:
I was running a Java Web Project in Netbeans 7.1. Earlier the project worked well, I was able to deploy and run the web application in Tomcat 7.0.22 from Netbeans 7.1
Suddenly, My project was not running. When tried to run in Netbeans, I got the following error.
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file
On Searching many forums, Everybody suggested to include javaee-api.6.0.jar file in compile time. But none were straight forward to do it in Netbeans.
Just tried to add the following jar files in Processor
javaee-api-6.0.jar
javaee-web-api-6.0.jar
How to add these Jar Files ?
- Open Web Application Project in Netbeans
- Right Click over Project , Select Properties
- In Project Properties Window, Click Libraries at LHS
- Click on Processor Tab
- Click Add JAR/Folder button, and add those two Jar file(s) and click Ok
Now You shall try running the Web Application from Netbeans.
Solution Reference:
- http://sys-exit.blogspot.in/2013/03/javalangclassformaterror-absent-code.html
- http://www.mkyong.com/hibernate/java-lang-classformaterror-absent-code-attribute-in-method-that-is-not-native-or-abstract-in-class-file/
- http://www.andrejkoelewijn.com/blog/2010/03/04/absent-code-attribute-in-method-that-is-not-native-or-abstract/
- http://forum.spring.io/forum/spring-projects/container/48831-classformaterror-absent-code-attribute
No comments:
Post a Comment