You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by William Hatch <wk...@me.com> on 2009/09/01 23:07:12 UTC

sure-fire plug in, no class def found error on TestCase?

Maven 2.0.9
JUnit 4.5
Surefire plug in 2.4.3
Maven quick start arch

one developer on our team is unable to get past a no class def found  
error which seems to be coming from the sure fire plug in. It's not  
finding TestCase. The junit jars are showing up in the repository and  
in the Add Dependency... search filter, and pom and repository are  
identical against another developers install. There's only one stubbed  
out test class which has no test methods in it right now, so not sure  
why this would be even getting this far.

org.apache.maven.surefire.booter.SurefireExecutionException: TestCase;  
nested exception is java.lang.NoClassDefFoundError: TestCase
java.lang.NoClassDefFoundError: TestCase
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
     at  
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at  
org 
.apache 
.maven 
.surefire 
.suite 
.AbstractDirectoryTestSuite 
.locateTestSets(AbstractDirectoryTestSuite.java:87)
     at  
org 
.apache 
.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
     at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
     at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at  
org 
.apache 
.maven 
.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java: 
338)
     at  
org 
.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java: 
997)

Any idea on what could be causing this? Anyway I can NOT use sure fire  
aside from switching to a different archetype?


Bill



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: sure-fire plug in, no class def found error on TestCase?

Posted by Wayne Fay <wa...@gmail.com>.
> org.apache.maven.surefire.booter.SurefireExecutionException: TestCase;
> nested exception is java.lang.NoClassDefFoundError: TestCase
> java.lang.NoClassDefFoundError: TestCase

Googling "NoClassDefFoundError TestCase" gave me this in the first two hits:
http://www.mail-archive.com/users@maven.apache.org/msg101000.html

Did you search before posting?

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: sure-fire plug in, no class def found error on TestCase?

Posted by Arnaud Bailly <ab...@oqube.com>.
Incorrect scope of dependencies ? Maybe you could post the pom.
-- 
Arnaud Bailly -- OQube
<software engineering>
http://www.oqube.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org