[ 
https://jira.codehaus.org/browse/SUREFIRE-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=352230#comment-352230
 ] 

Tibor Digana commented on SUREFIRE-1071:
----------------------------------------

These kinds of failures need having deeper look.

Definitely this class was modified with maven-shade-plugin. 
Download project from Github and check the configuration of every pom.xml 
having "maven-shade-plugin" if repackaging org.apache.maven.shared package.
Then Check Release Notes if some higher version of shade plugin has candidate 
bug fix.
You can check requirements for Java version in the bytecode.

Alternatively you may use some IBM bytecode verifier tool if exists, 
before/after bytecode manipulation.

> LinkageError 
> org.apache.maven.surefire.shade.org.apache.maven.shared.utils.io.IOUtil
> ------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1071
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1071
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.16
>         Environment: Maven 3.1.1 and Maven 3.2.1
>            Reporter: Julian Payne
>            Priority: Blocker
>
> 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



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to