I have a strange classpath problem in m2e and hope you can help.

 

At the command line (CMD.EXE) on my Windows 7 (64 Bit) machine I can
type "mvn test", which compiles and tests and then says all is good.

 

Also, I can run "Run As > Maven test", which prints in the "Console"
view that the test passed and all is good.

 

But within Eclipse when doing "Run As > JUnit Test", it flips the bar to
red after some tests and then says:

 

java.lang.ClassFormatError: Absent Code attribute in method that is not
native or abstract in class file javax/ejb/EJBException

                at java.lang.ClassLoader.defineClass1(Native Method)

                at
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

                at
java.lang.ClassLoader.defineClass(ClassLoader.java:615)

                at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

                at
java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

                at
java.net.URLClassLoader.access$000(URLClassLoader.java:58)

                at
java.net.URLClassLoader$1.run(URLClassLoader.java:197)

                at java.security.AccessController.doPrivileged(Native
Method)

                at
java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                at
de.quipsy.entities.ProjectAPQPCompliance.canBeEdited(ProjectAPQPComplian
ce.java:68)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

                at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

                at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMet
hod.java:45)

                at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallab
le.java:15)

                at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMetho
d.java:42)

                at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod
.java:20)

                at
org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)

                at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner
.java:68)

                at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner
.java:47)

                at
org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)

                at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)

                at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)

                at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)

                at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)

                at
org.junit.runners.ParentRunner.run(ParentRunner.java:300)

                at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Tes
tReference.java:50)

                at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja
va:38)

                at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:467)

                at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:683)

                at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:390)

                at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:197)

 

Why is this working at CLI but not in GUI? And what the heck is "Absent
Code attribute" (I only know "ClassNotFoundException")?

 

I tried to fix it using "Maven > Update Project...", but this did not
help. Strange but true, the code compiles very well in Eclipse,
including all uses of javax.ejb.EJBException in the java source, and the
tree node "Maven Dependencies" actually shows "javaee-api-6.0.jar"
containing "javax/ejb/EJBException" in Eclipse's "Package Explorer"
view!

 

I'm really confused...!

 

Thanks!

Markus

_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to