Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12259

NullPointerException in maven-plugin: Maven3Builder / ExecutedMojo (1.445)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • RedHat Linux, Java 1.6.0_26.

      Just updated to Jenkins 1.445 from 1.427 and now am getting this NPE; looks like either the MojoDescriptor or PluginDescriptor param to getMojoClass() is null, or else classRealm (in the latter case, might have been fixed by olamy's changes on Dec 29th):

      Caused by: java.lang.NullPointerException
      at hudson.maven.ExecutedMojo.getMojoClass(ExecutedMojo.java:114)
      at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:99)
      at hudson.maven.Maven3Builder$MavenExecutionListener.recordExecutionTime(Maven3Builder.java:524)
      at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoSucceeded(Maven3Builder.java:493)
      at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:601)
      at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:97)

      Last message logged prior to this seems to be:

      [DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]

      This is in a child project, not the parent.

          [JENKINS-12259] NullPointerException in maven-plugin: Maven3Builder / ExecutedMojo (1.445)

          Larry West added a comment -

          Rolled back to 1.444 and the NPE disappeared.

          Also: not sure if this is relevant, but the same problem occurred with both Maven 3.0.2 and Maven 3.0.3 installed.

          Finally, my attachment name has a typo: should be "20111230-jenkins-1.445.systemInfo.htm".

          Larry West added a comment - Rolled back to 1.444 and the NPE disappeared. Also: not sure if this is relevant, but the same problem occurred with both Maven 3.0.2 and Maven 3.0.3 installed. Finally, my attachment name has a typo: should be "20111230-jenkins-1.445.systemInfo.htm".

          Olivier Lamy added a comment -

          Olivier Lamy added a comment - fixed with https://github.com/jenkinsci/jenkins/commit/22317ad5c0a94bfa660d6a669f3cf0e18010283a

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/78792b35b3106db2cfca892ac99070a07a4d3a0c
          Log:
          JENKINS-12259 add change log entry

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/78792b35b3106db2cfca892ac99070a07a4d3a0c Log: JENKINS-12259 add change log entry

          Olivier Lamy added a comment -

          will be in 1.447.

          Olivier Lamy added a comment - will be in 1.447.

          jeremy comte added a comment -

          Hi there,

          We are still running into the same problem on one of our projects ...
          We just updated Jenkins to 1.448 but it doesn't change anything.

          The stack trace is the following:

          Waiting for Jenkins to finish collecting data
          mavenExecutionResult exceptions not empty
          message : Internal error: java.lang.NullPointerException
          cause : null
          Stack trace :
          org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
          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:597)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
          at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:112)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:287)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Caused by: java.lang.NullPointerException
          at hudson.maven.ExecutedMojo.getMojoClass(ExecutedMojo.java:114)
          at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:99)
          at hudson.maven.Maven3Builder$MavenExecutionListener.recordExecutionTime(Maven3Builder.java:524)
          at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoSucceeded(Maven3Builder.java:493)
          at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:601)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:97)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:383)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
          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:84)
          ... 24 more
          channel stopped
          Finished: FAILURE

          The last printout before failure is:

          [INFO] — flexmojos-maven-plugin:3.9:test-run (default) @ gameselector-tests —
          [INFO] Flexmojos 3.9
          [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
          [INFO] Skipping test phase.
          [JENKINS] Recording test results
          [JENKINS] Archiving ...

          Our tests are disabled because they are flash files so they can't be run on our build server.
          Everything worked well for months until first week of January.

          Cheers,
          Jeremy

          jeremy comte added a comment - Hi there, We are still running into the same problem on one of our projects ... We just updated Jenkins to 1.448 but it doesn't change anything. The stack trace is the following: Waiting for Jenkins to finish collecting data mavenExecutionResult exceptions not empty message : Internal error: java.lang.NullPointerException cause : null Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:112) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at hudson.maven.ExecutedMojo.getMojoClass(ExecutedMojo.java:114) at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:99) at hudson.maven.Maven3Builder$MavenExecutionListener.recordExecutionTime(Maven3Builder.java:524) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoSucceeded(Maven3Builder.java:493) at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:601) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:97) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:383) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) 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:84) ... 24 more channel stopped Finished: FAILURE The last printout before failure is: [INFO] — flexmojos-maven-plugin:3.9:test-run (default) @ gameselector-tests — [INFO] Flexmojos 3.9 [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file [INFO] Skipping test phase. [JENKINS] Recording test results [JENKINS] Archiving ... Our tests are disabled because they are flash files so they can't be run on our build server. Everything worked well for months until first week of January. Cheers, Jeremy

          Kim Blomqvist added a comment -

          Running Jenkins ver. 1.447:
          I'm getting the same stacktrace when I enable a profile. This profile only starts jetty before integration tests:

          <phase>pre-integration-test</phase>
          <goals>
            <goal>run</goal>
          </goals>
          

          Without this profile the build succeeds, and the executed mojos are:

          org.apache.maven.plugins:maven-clean-plugin 	2.4.1	clean	default-clean	0.23 sec	fingerprint
          org.apache.maven.plugins:maven-resources-plugin 	2.5	resources	default-resources	0.2 sec	fingerprint
          org.apache.maven.plugins:maven-compiler-plugin 	2.3.2	compile	default-compile	0.9 sec	fingerprint
          org.apache.maven.plugins:maven-resources-plugin 	2.5	testResources	default-testResources	15 ms	fingerprint
          org.apache.maven.plugins:maven-compiler-plugin 	2.3.2	testCompile	default-testCompile	3.3 sec	fingerprint
          org.apache.maven.plugins:maven-surefire-plugin 	2.9	test	default-test	0.45 sec	fingerprint
          org.apache.maven.plugins:maven-jar-plugin 	2.3.2	jar	default-jar	0.31 sec	fingerprint
          org.apache.maven.plugins:maven-install-plugin 	2.3.1	install	default-install	63 ms	fingerprint
          

          But with this profile they are:

          org.apache.maven.plugins:maven-clean-plugin 	2.4.1	clean	default-clean	0.26 sec	fingerprint
          org.apache.maven.plugins:maven-resources-plugin 	2.5	resources	default-resources	0.24 sec	fingerprint
          org.apache.maven.plugins:maven-compiler-plugin 	2.3.2	compile	default-compile	0.73 sec	fingerprint
          org.apache.maven.plugins:maven-resources-plugin 	2.5	testResources	default-testResources	15 ms	fingerprint
          org.apache.maven.plugins:maven-compiler-plugin 	2.3.2	testCompile	default-testCompile	3 sec	fingerprint
          org.apache.maven.plugins:maven-surefire-plugin 	2.9	test	default-test	0.48 sec	fingerprint
          org.apache.maven.plugins:maven-jar-plugin 	2.3.2	jar	default-jar	0.25 sec	fingerprint
          org.apache.maven.plugins:maven-resources-plugin 	2.5	resources	default-resources	3 ms	fingerprint
          org.apache.maven.plugins:maven-compiler-plugin 	2.3.2	compile	default-compile	46 ms	fingerprint
          org.apache.maven.plugins:maven-resources-plugin 	2.5	testResources	default-testResources	5 ms	fingerprint
          org.apache.maven.plugins:maven-compiler-plugin 	2.3.2	testCompile	default-testCompile	10 ms	fingerprint
          

          So it seems the jetty:run execution is causing re-execution of the maven-resources-plugin and maven-compiler-plugin (as it should, at least according to my interpretation of http://jetty.codehaus.org/jetty/maven-plugin/run-mojo.html). Of course as the compilation already has been done, maven won't recompile stuff. It only informs me:

          [INFO] Copying 3 resources
          [INFO] Nothing to compile - all classes are up to date
          [JENKINS] Archiving ..redacted...
          [JENKINS] Archiving ..redacted..
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD FAILURE
          

          And then prints the stacktrace from the previous comment.

          The problem might be in how Jenkins handles the (valid) re-execution of test-compile, but inside a fork?

          Kim Blomqvist added a comment - Running Jenkins ver. 1.447: I'm getting the same stacktrace when I enable a profile. This profile only starts jetty before integration tests: <phase>pre-integration-test</phase> <goals> <goal>run</goal> </goals> Without this profile the build succeeds, and the executed mojos are: org.apache.maven.plugins:maven-clean-plugin 2.4.1 clean default-clean 0.23 sec fingerprint org.apache.maven.plugins:maven-resources-plugin 2.5 resources default-resources 0.2 sec fingerprint org.apache.maven.plugins:maven-compiler-plugin 2.3.2 compile default-compile 0.9 sec fingerprint org.apache.maven.plugins:maven-resources-plugin 2.5 testResources default-testResources 15 ms fingerprint org.apache.maven.plugins:maven-compiler-plugin 2.3.2 testCompile default-testCompile 3.3 sec fingerprint org.apache.maven.plugins:maven-surefire-plugin 2.9 test default-test 0.45 sec fingerprint org.apache.maven.plugins:maven-jar-plugin 2.3.2 jar default-jar 0.31 sec fingerprint org.apache.maven.plugins:maven-install-plugin 2.3.1 install default-install 63 ms fingerprint But with this profile they are: org.apache.maven.plugins:maven-clean-plugin 2.4.1 clean default-clean 0.26 sec fingerprint org.apache.maven.plugins:maven-resources-plugin 2.5 resources default-resources 0.24 sec fingerprint org.apache.maven.plugins:maven-compiler-plugin 2.3.2 compile default-compile 0.73 sec fingerprint org.apache.maven.plugins:maven-resources-plugin 2.5 testResources default-testResources 15 ms fingerprint org.apache.maven.plugins:maven-compiler-plugin 2.3.2 testCompile default-testCompile 3 sec fingerprint org.apache.maven.plugins:maven-surefire-plugin 2.9 test default-test 0.48 sec fingerprint org.apache.maven.plugins:maven-jar-plugin 2.3.2 jar default-jar 0.25 sec fingerprint org.apache.maven.plugins:maven-resources-plugin 2.5 resources default-resources 3 ms fingerprint org.apache.maven.plugins:maven-compiler-plugin 2.3.2 compile default-compile 46 ms fingerprint org.apache.maven.plugins:maven-resources-plugin 2.5 testResources default-testResources 5 ms fingerprint org.apache.maven.plugins:maven-compiler-plugin 2.3.2 testCompile default-testCompile 10 ms fingerprint So it seems the jetty:run execution is causing re-execution of the maven-resources-plugin and maven-compiler-plugin (as it should, at least according to my interpretation of http://jetty.codehaus.org/jetty/maven-plugin/run-mojo.html ). Of course as the compilation already has been done, maven won't recompile stuff. It only informs me: [INFO] Copying 3 resources [INFO] Nothing to compile - all classes are up to date [JENKINS] Archiving ..redacted... [JENKINS] Archiving ..redacted.. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE And then prints the stacktrace from the previous comment. The problem might be in how Jenkins handles the (valid) re-execution of test-compile, but inside a fork?

          FWIW: I had the same problem in 1.446. The problem went away in 1.448.
          Maybe this can help with reproducing it: My jenkins job is for building git@github.com:karel1980/whirr.git (commit f0dbcc7be9), which is a fork+patches of apache/whirr.git. Jenkins is configured to use maven 3.0.3

          Karel Vervaeke added a comment - FWIW: I had the same problem in 1.446. The problem went away in 1.448. Maybe this can help with reproducing it: My jenkins job is for building git@github.com:karel1980/whirr.git (commit f0dbcc7be9), which is a fork+patches of apache/whirr.git. Jenkins is configured to use maven 3.0.3

          Olivier Lamy added a comment -

          @jeremy comte stack trace doesn't correspond to 1.448 source code.

          Olivier Lamy added a comment - @jeremy comte stack trace doesn't correspond to 1.448 source code.

          Kim Blomqvist added a comment - - edited

          @olamy: I upgraded to 1.448, and were able to reproduce exactly the same stacktrace as jeremy comte posted. EDIT: but I seem to be running Maven Integration plugin 1.445.

          Kim Blomqvist added a comment - - edited @olamy: I upgraded to 1.448 , and were able to reproduce exactly the same stacktrace as jeremy comte posted. EDIT: but I seem to be running Maven Integration plugin 1.445.

          Kim Blomqvist added a comment -

          Maven Integration plugin had been pinned, and thus wasn't updated automatically. Unpinning it and restarting Jenkins fixed the problem. Thanks for all the help @olamy.

          Kim Blomqvist added a comment - Maven Integration plugin had been pinned, and thus wasn't updated automatically. Unpinning it and restarting Jenkins fixed the problem. Thanks for all the help @olamy.

          jeremy comte added a comment -

          Same than Kim, the maven plugin was stuck on 1.446 within jenkins 1.448.
          It works now

          Thanks a lot!

          jeremy comte added a comment - Same than Kim, the maven plugin was stuck on 1.446 within jenkins 1.448. It works now Thanks a lot!

          Olivier Lamy added a comment -

          So it really looks we can consider this fixed

          Olivier Lamy added a comment - So it really looks we can consider this fixed

          hagzag added a comment -

          I have the same exact issue with 1.496 (I validated the maven integration plugin isn't pinned):

          Waiting for Jenkins to finish collecting data
          mavenExecutionResult exceptions not empty
          message : Internal error: java.lang.NullPointerException
          cause : null
          Stack trace :
          org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
          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:597)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
          at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:326)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Caused by: java.lang.NullPointerException
          at hudson.maven.Maven3Builder$MavenExecutionListener.recordProjectStarted(Maven3Builder.java:329)
          at hudson.maven.Maven3Builder$MavenExecutionListener.projectStarted(Maven3Builder.java:319)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:71)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:78)
          ... 24 more
          channel stopped
          Notifying upstream projects of job completion
          Finished: FAILURE

          hagzag added a comment - I have the same exact issue with 1.496 (I validated the maven integration plugin isn't pinned): Waiting for Jenkins to finish collecting data mavenExecutionResult exceptions not empty message : Internal error: java.lang.NullPointerException cause : null Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:100) at hudson.maven.Maven3Builder.call(Maven3Builder.java:66) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at hudson.maven.Maven3Builder$MavenExecutionListener.recordProjectStarted(Maven3Builder.java:329) at hudson.maven.Maven3Builder$MavenExecutionListener.projectStarted(Maven3Builder.java:319) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:71) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:78) ... 24 more channel stopped Notifying upstream projects of job completion Finished: FAILURE

          hagzag added a comment - Still happening in 1.496, more info :: https://issues.jenkins-ci.org/browse/JENKINS-12259?focusedCommentId=171441&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-171441

          J Knurek added a comment - - edited

          I'm getting what looks to be the same issue in v1.598

          [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
          org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          	at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          .....
          

          I'm running `mvn clean package site` using version 2.9 of Maven Integration plugin; maven version 3.1.1
          As mentioned in JENKINS-12358 this also works for me in a freestyle job, just not with the Maven plugin.

          J Knurek added a comment - - edited I'm getting what looks to be the same issue in v1.598 [ERROR] Internal error: java.lang.NullPointerException -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ..... I'm running ` mvn clean package site ` using version 2.9 of Maven Integration plugin; maven version 3.1.1 As mentioned in JENKINS-12358 this also works for me in a freestyle job, just not with the Maven plugin.

          puce added a comment - - edited

          I'm getting the same issue when running the Maven phase "site-deploy"

          Jenkins version: 1.618
          Maven Integration Plugin version: 2.10
          Maven version: 3.0.5
          Java version:
          java version "1.8.0_45"
          Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
          Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

          Waiting for Jenkins to finish collecting data
          [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
          org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          	at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:497)
          	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
          	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
          	at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:497)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
          	at hudson.remoting.Request$2.run(Request.java:325)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: java.lang.NullPointerException
          	at hudson.maven.reporters.MavenSiteArchiver.getModulePath(MavenSiteArchiver.java:126)
          	at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:82)
          	at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:634)
          	at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:615)
          	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
          	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
          	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:84)
          	... 27 more
          

          puce added a comment - - edited I'm getting the same issue when running the Maven phase "site-deploy" Jenkins version: 1.618 Maven Integration Plugin version: 2.10 Maven version: 3.0.5 Java version: java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) Waiting for Jenkins to finish collecting data [ERROR] Internal error: java.lang.NullPointerException -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at hudson.maven.Maven3Builder.call(Maven3Builder.java:136) at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang. Thread .run( Thread .java:745) Caused by: java.lang.NullPointerException at hudson.maven.reporters.MavenSiteArchiver.getModulePath(MavenSiteArchiver.java:126) at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:82) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:634) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:615) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) 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:84) ... 27 more

          Sven Klemm added a comment -

          We have a simmilar problem through javadoc generation (org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:aggregate -B -e -fae)

          Local maven build works fine

          On jenkins we get:

          [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
          org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          	at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
          	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.launchStandard(Launcher.java:329)
          	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
          	at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
          	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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
          	at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          	at hudson.remoting.Request$2.run(Request.java:328)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          	at java.lang.Thread.run(Thread.java:724)
          Caused by: java.lang.NullPointerException
          	at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:624)
          	at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:610)
          	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
          	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
          	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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
          	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
          	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:84)
          	... 27 more
          

          Sven Klemm added a comment - We have a simmilar problem through javadoc generation (org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:aggregate -B -e -fae) Local maven build works fine On jenkins we get: [ERROR] Internal error: java.lang.NullPointerException -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117) 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.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178) 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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134) at hudson.maven.Maven3Builder.call(Maven3Builder.java:69) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang. Thread .run( Thread .java:724) Caused by: java.lang.NullPointerException at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:624) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:610) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) 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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) 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:84) ... 27 more

            Unassigned Unassigned
            larry_west Larry West
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: