When compiling a EJB project there might be a case in which the java EE API comes before eclipseLink API in the class path. Hence the following error may be generated.
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
.....
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
../..//nbproject/build-impl.xml:839: The following error occurred while executing this line:
../../nbproject/build-impl.xml:258: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
The solution is simple:-) Just make the eclipseLink API first in the project libraries configuration.
No comments:
Post a Comment