Anyone know whats going on? The build is failing because the
surefire plugin is unable to find junit classes:
java.lang.NoClassDefFoundError: junit/framework/TestCase
WTF? This is relatively new behavior... something has changed in the
past day or so which is causing this... but I've no idea what it is.
Anyone have any clue?
The snip below is from a build I did today of server/branches/1.2
(rev 502120, no local changes) with a clean repo. I checked to make
sure that the junit jars were valid too and the jar looked fine. I
see the exact same problem on my local machine as well on remote
gbuild hosts.
<snip>
...
[INFO]
------------------------------------------------------------------------
----
[INFO] Building Geronimo :: Activation
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
----
[INFO] [tools:require-java-version {execution: validate-java-version}]
[INFO] [tools:copy-legal-files {execution: install-legal-files}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/
apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.pom
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
activation_1.0.2_spec:pom:1.2' from repository apache-snapshots
(http://people.apache.org/repo/m2-snapshot-repository)
Downloading: http://people.apache.org/repo/m2-incubating-repository//
org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.pom
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
activation_1.0.2_spec:pom:1.2' from repository apache-incubator
(http://people.apache.org/repo/m2-incubating-repository/)
Downloading: http://repository.codehaus.org/org/apache/geronimo/specs/
geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.pom
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
activation_1.0.2_spec:pom:1.2' from repository codehaus (http://
repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/geronimo/specs/
geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.pom
817b downloaded
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/
apache/geronimo/specs/geronimo-javamail_1.3.1_spec/1.2/geronimo-
javamail_1.3.1_spec-1.2.pom
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
javamail_1.3.1_spec:pom:1.2' from repository apache-snapshots (http://
people.apache.org/repo/m2-snapshot-repository)
Downloading: http://people.apache.org/repo/m2-incubating-repository//
org/apache/geronimo/specs/geronimo-javamail_1.3.1_spec/1.2/geronimo-
javamail_1.3.1_spec-1.2.pom
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
javamail_1.3.1_spec:pom:1.2' from repository apache-incubator (http://
people.apache.org/repo/m2-incubating-repository/)
Downloading: http://repository.codehaus.org/org/apache/geronimo/specs/
geronimo-javamail_1.3.1_spec/1.2/geronimo-javamail_1.3.1_spec-1.2.pom
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
javamail_1.3.1_spec:pom:1.2' from repository codehaus (http://
repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/geronimo/specs/
geronimo-javamail_1.3.1_spec/1.2/geronimo-javamail_1.3.1_spec-1.2.pom
1K downloaded
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/
apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.jar
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
activation_1.0.2_spec:jar:1.2' from repository apache-snapshots
(http://people.apache.org/repo/m2-snapshot-repository)
Downloading: http://people.apache.org/repo/m2-incubating-repository//
org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.jar
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
activation_1.0.2_spec:jar:1.2' from repository apache-incubator
(http://people.apache.org/repo/m2-incubating-repository/)
Downloading: http://repository.codehaus.org/org/apache/geronimo/specs/
geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.jar
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
activation_1.0.2_spec:jar:1.2' from repository codehaus (http://
repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/geronimo/specs/
geronimo-activation_1.0.2_spec/1.2/geronimo-
activation_1.0.2_spec-1.2.jar
33K downloaded
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/
apache/geronimo/specs/geronimo-javamail_1.3.1_spec/1.2/geronimo-
javamail_1.3.1_spec-1.2.jar
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
javamail_1.3.1_spec:jar:1.2' from repository apache-snapshots (http://
people.apache.org/repo/m2-snapshot-repository)
Downloading: http://people.apache.org/repo/m2-incubating-repository//
org/apache/geronimo/specs/geronimo-javamail_1.3.1_spec/1.2/geronimo-
javamail_1.3.1_spec-1.2.jar
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
javamail_1.3.1_spec:jar:1.2' from repository apache-incubator (http://
people.apache.org/repo/m2-incubating-repository/)
Downloading: http://repository.codehaus.org/org/apache/geronimo/specs/
geronimo-javamail_1.3.1_spec/1.2/geronimo-javamail_1.3.1_spec-1.2.jar
[WARNING] Unable to get resource 'org.apache.geronimo.specs:geronimo-
javamail_1.3.1_spec:jar:1.2' from repository codehaus (http://
repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/geronimo/specs/
geronimo-javamail_1.3.1_spec/1.2/geronimo-javamail_1.3.1_spec-1.2.jar
178K downloaded
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
Downloading: http://repository.codehaus.org/org/codehaus/plexus/
plexus-utils/1.1/plexus-utils-1.1.jar
[WARNING] Unable to get resource 'org.codehaus.plexus:plexus-
utils:jar:1.1' from repository codehaus (http://repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-
utils/1.1/plexus-utils-1.1.jar
164K downloaded
Downloading: http://repository.codehaus.org/org/apache/maven/surefire/
surefire-junit/2.0/surefire-junit-2.0.pom
[WARNING] Unable to get resource 'org.apache.maven.surefire:surefire-
junit:pom:2.0' from repository codehaus (http://repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/
surefire-junit/2.0/surefire-junit-2.0.pom
583b downloaded
Downloading: http://repository.codehaus.org/org/apache/maven/surefire/
surefire-providers/2.0/surefire-providers-2.0.pom
[WARNING] Unable to get resource 'org.apache.maven.surefire:surefire-
providers:pom:2.0' from repository codehaus (http://
repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/
surefire-providers/2.0/surefire-providers-2.0.pom
1K downloaded
Downloading: http://repository.codehaus.org/org/apache/maven/surefire/
surefire-junit/2.0/surefire-junit-2.0.jar
[WARNING] Unable to get resource 'org.apache.maven.surefire:surefire-
junit:jar:2.0' from repository codehaus (http://repository.codehaus.org)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/surefire/
surefire-junit/2.0/surefire-junit-2.0.jar
11K downloaded
[INFO] Surefire report directory: /Users/jason/ws/geronimo/server-1.2/
modules/geronimo-activation/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: junit/
framework/TestCase; nested exception is
java.lang.NoClassDefFoundError: junit/framework/TestCase
java.lang.NoClassDefFoundError: junit/framework/TestCase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
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:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass
(IsolatedClassLoader.java:100)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
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:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass
(IsolatedClassLoader.java:100)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
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:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass
(IsolatedClassLoader.java:100)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSet
s(AbstractDirectoryTestSuite.java:84)
at
org.apache.maven.surefire.Surefire.createSuiteFromDefinition
(Surefire.java:147)
at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
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:225)
at org.apache.maven.surefire.booter.SurefireBooter.main
(SurefireBooter.java:747)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
[INFO]
------------------------------------------------------------------------
</snip>
--jason