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

Tibor Digana commented on SUREFIRE-1121:
----------------------------------------

Does it happen very often?
It looks like the ArrayList in ForkStarter#defaultReporterFactoryList is 
not-threadsafe used in concurrent access.
And you are using forked tests 2C, so these are symptoms.

<plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.17</version>
          <executions>
            <execution>
              <id>default-test</id>
              <phase>test</phase>
              <goals>
                <goal>test</goal>
              </goals>
              <configuration>
                <argLine>-XX:MaxPermSize=512m</argLine>
                <systemPropertyVariables>
                  <java.awt.headless>true</java.awt.headless>
                </systemPropertyVariables>
                <forkCount>2C</forkCount>
                <reuseForks>true</reuseForks>
                <excludes>
                  <exclude>${log4j.skip.test1}</exclude>
                  <exclude>${log4j.skip.test2}</exclude>
                </excludes>
              </configuration>
            </execution>
          </executions>
          <configuration>
            <argLine>-XX:MaxPermSize=512m</argLine>
            <systemPropertyVariables>
              <java.awt.headless>true</java.awt.headless>
            </systemPropertyVariables>
            <forkCount>2C</forkCount>
            <reuseForks>true</reuseForks>
            <excludes>
              <exclude>${log4j.skip.test1}</exclude>
              <exclude>${log4j.skip.test2}</exclude>
            </excludes>
          </configuration>
        </plugin>

> java.lang.NullPointerException 
> org.apache.maven.plugin.surefire.report.DefaultReporterFactory.mergeFromOtherFactories(DefaultReporterFactory.java:82)
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1121
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1121
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.18
>         Environment: Apache Maven 3.2.3 
> (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T16:58:10-04:00)
> Maven home: C:\Java\apache-maven-3.2.3
> Java version: 1.7.0_71, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.7.0_71\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Gary Gregory
>            Assignee: Tibor Digana
>            Priority: Blocker
>         Attachments: effective.pom
>
>
> git clone http://git-wip-us.apache.org/repos/asf/logging-log4j2.git
> Check out Log4j 2 commit {{d033a71eb0047ca35ec1582f0eab73abe3e04919}}. This 
> is currently the latest.
> Run: {{mvn -e clean test}}
> I get:
> {noformat}
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache Log4j 2 ..................................... SUCCESS [  0.566 
> s]
> [INFO] Apache Log4j API ................................... SUCCESS [ 26.239 
> s]
> [INFO] Apache Log4j Core .................................. SUCCESS [05:09 
> min]
> [INFO] Apache Log4j 1.x Compatibility API ................. SUCCESS [  9.233 
> s]
> [INFO] Apache Log4j SLF4J Binding ......................... SUCCESS [  8.507 
> s]
> [INFO] Apache Log4j to SLF4J Adapter ...................... FAILURE [  5.781 
> s]
> [INFO] Apache Log4j Commons Logging Bridge ................ SKIPPED
> [INFO] Apache Log4j Flume Bridge .......................... SKIPPED
> [INFO] Apache Log4j Web ................................... SKIPPED
> [INFO] Apache Log4j Tag Library ........................... SKIPPED
> [INFO] Apache Log4j JMX GUI ............................... SKIPPED
> [INFO] Apache Log4j Samples ............................... SKIPPED
> [INFO] Apache Log4j Samples: Flume - Common ............... SKIPPED
> [INFO] Apache Log4j Samples: Flume - Remote ............... SKIPPED
> [INFO] Apache Log4j Samples: Flume - Embedded ............. SKIPPED
> [INFO] Apache Log4j BOM ................................... SKIPPED
> [INFO] Apache Log4j NoSQL ................................. SKIPPED
> [INFO] Apache Log4J Performance Tests ..................... SKIPPED
> [INFO] Apache Log4j Streaming Interface ................... SKIPPED
> [INFO] Apache Log4j JUL Adapter ........................... SKIPPED
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 06:02 min
> [INFO] Finished at: 2014-12-01T10:51:31-05:00
> [INFO] Final Memory: 34M/266M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on 
> project log4j-to-slf4j: Execution default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed. 
> NullPointerExc
> eption -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) 
> on project log4j-to-slf4j: Execution default-test of goal 
> org.apache.maven.plugins:maven-
> surefire-plugin:2.18:test failed.
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>         at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
> default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test 
> failed.
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>         ... 19 more
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.maven.plugin.surefire.report.DefaultReporterFactory.mergeFromOtherFactories(DefaultReporterFactory.java:82)
>         at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:182)
>         at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1019)
>         at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:853)
>         at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:751)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>         ... 20 more
> [ERROR]
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the 
> command
> [ERROR]   mvn <goals> -rf :log4j-to-slf4j
> Mon 12/01/2014-10:51:32.19 C:\vcs\git\apache\logging\logging-log4j2> m32 
> -version
> {noformat}



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

Reply via email to