A very strange and rare problem, happened in JPA or Hibernate development.

Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is 
        not native or abstract in class file javax/persistence/GenerationType
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at Source)
	at Source)
	at$000(Unknown Source)
	at$ Source)
	at Method)
	at Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknow


This is always caused by the javaee.jar which is located at Many developers like to grab the javaee.jar with the following Maven coordinate :

    <!-- Javaee API -->

But, the javaee.jar from is not contains any method bodies, but the APIs name only. Which is not suitable to use for running or deploying along with your application.

The good practice is always get the original full version of javaee.jar file from the Just download and install the J2EE SDK, and the javaee.jar can be found in the “\J2EE_SDK_FOLDER\lib” folder. Include it into your local Maven repository or poject classpath will get rid of the above error message.