This error is reported as an error in NetBeans (with resolved status, since it is considered a "user error"). The following is the main comment that explains the problem and gives a solution:
"ClassFormatError: Missing code attribute in method ..." always indicates that javaee-api-6.0.jar is used to execute at runtime. The box contains only method signatures (method bodies are deleted) and is suitable only for compilation. In future versions of javac, you may receive an error message.
The problem is that javaee-api-6.0.jar is on the class path in front of the EclipseLink banks, and when you start the EclipseLink comment handler, classes from javaee-api-6.0.jar are used instead of classes from EclipseLink. The first thing that javaee-api-6.0.jar should be removed from the class path of the EJB project - it should not be necessary, because the EJB project has a selected application server, and the project accepts the EE 6 API from this server.
As I understand the comment, you should try to remove any link to javaee-api-6.0.jar (which contains only the "dummy" classes) from the project class path, because the EclipseLink library must provide the correct classes used by the annotation processor.
Also, this question seems to solve the same problem.
manouti
source share