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

Mikhail Mazursky commented on SUREFIRE-994:
-------------------------------------------

{noformat}
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.14.1</version>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <argLine>${org.jacoco.surefire.argLine} -XX:MaxPermSize=128m 
-Xmx1024m</argLine>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <argLine>${org.jacoco.surefire.argLine} -XX:MaxPermSize=128m 
-Xmx1024m</argLine>
        </configuration>
      </plugin>
{noformat}
We use JaCoCo to collect coverage. Maybe it's causing this problem? We use this 
configuration to generate JVM agent command line for JaCoCo (output from 
help:effective-pom):
{noformat}
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.6.2.201302030002</version>
        <executions>
          <execution>
            <id>prepare-test-agent</id>
            <phase>test-compile</phase>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <propertyName>org.jacoco.surefire.argLine</propertyName>
              <includes>
                <include>com.PROJECT1.*</include>
                <include>com.PROJECT2.*</include>
              </includes>
              <sessionId>PROJECT unit tests</sessionId>
              <destFile>PROJECT/target/jacoco.unit.exec</destFile>
              <append>false</append>
            </configuration>
          </execution>
        </executions>
      </plugin>
{noformat}
                
> java.lang.ClassNotFoundException: org.testng.TestNG
> ---------------------------------------------------
>
>                 Key: SUREFIRE-994
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-994
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading, Maven Surefire Plugin, TestNG support
>    Affects Versions: 2.14, 2.14.1
>         Environment: Linux mazursky-box 3.8.0-19-generic #30-Ubuntu SMP Wed 
> May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.7.0_21"
> OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>            Reporter: Mikhail Mazursky
>
> This happens sometimes (rarely). 2.14, 14.1 are affected and earlier versions 
> too I think.
> The setting is:
> - parallel build,
> - surefire and failsafe are forked always.
> Is there anything more I can provide to help debug this?
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on 
> project PROJECT: Execution default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test failed: There was 
> an error in the forked process
> [ERROR] java.lang.NoClassDefFoundError: org/testng/TestNG
> [ERROR] at 
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:64)
> [ERROR] at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:189)
> [ERROR] at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:105)
> [ERROR] at 
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:117)
> [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [ERROR] at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> [ERROR] at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
> [ERROR] at 
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
> [ERROR] at 
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
> [ERROR] at 
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
> [ERROR] at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> [ERROR] at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
> [ERROR] Caused by: java.lang.ClassNotFoundException: org.testng.TestNG
> [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> [ERROR] at java.security.AccessController.doPrivileged(Native Method)
> [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
> [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> [ERROR] at 
> org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
> [ERROR] ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to