users@glassfish.java.net

Re: Absent Code attribute in method that is not native or abstract!

From: <glassfish_at_javadesktop.org>
Date: Tue, 17 Jul 2007 07:54:56 PDT

Here is the answer

http://weblogs.java.net/blog/ludo/archive/2007/01/java_ee_5_apis.html

I was using the maven artifacts which are seriously stubbed jars. They only let you compile, not link runtime.

This causes great problems when trying to use, e.g. EasyMock to mock classes for unit tests.

The JDK 1.5 vs 1.6 issue is because 1.6 includes the persistence stuff itself. When forking, though, the forked classloader puts the stubbed versions first in the classpath, thereby breaking everything again.

Three days wasted all because of somebody putting stubbed borked jars in a Maven repository. Only working jars should be in a maven repository!
[Message sent by forum member 'stephenconnolly' (stephenconnolly)]

http://forums.java.net/jive/thread.jspa?messageID=226931