Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
3.2.3
-
None
-
Maven 3.1.1 and Maven 3.2.1
Description
Every so often when I am running the unit tests on a standard Maven project I get a linkage error:
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ asf-maven-
plugin —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ asf-maven-plugi
n —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ as
f-maven-plugin —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory d:\rtc-workspace-asf-10\asf-build-sys
tem\maven-plugins\asf-maven-plugin\src\test-resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ asf-mav
en-plugin —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.16:test (default-test) @ asf-maven-plugin —
[INFO] Surefire report directory: d:\rtc-workspace-asf-10\asf-build-system\maven
-plugins\asf-maven-plugin\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Exception in thread "Thread-7" java.lang.LinkageError: org.apache.maven.surefire
.shade.org.apache.maven.shared.utils.io.IOUtil
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:306)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:700)
at java.net.URLClassLoader.access$400(URLClassLoader.java:81)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1148)
at java.security.AccessController.doPrivileged(AccessController.java:366
)
at java.net.URLClassLoader.findClass(URLClassLoader.java:583)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(Cl
assRealm.java:389)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl
ass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:227)
at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Str
eamPumper.run(StreamPumper.java:95)
Terminate batch job (Y/N)? y
This error is not reproducible but I am getting it from time to time when running maven on the command line as well as in my Jenkins jobs that are running Maven jobs.
When this LinkageError occurs the maven run blocks.
This is what I have in the effective pom for the run above that blocked:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<inherited>true</inherited>
<configuration>
<argLine>-Xms768m -Xmx768m</argLine>
<trimStackTrace>true</trimStackTrace>
<childDelegation>false</childDelegation>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.dom4j:dom4j</classpathDependencyExclude>
</classpathDependencyExcludes>
</configuration>
</plugin>
Thanks,
Julian Payne