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

NullPointeException in hudson.maven.Maven3Builder$MavenExecutionListener.sessionEnded

      [INFO] Installing /home/appusr/.jenkins/jobs/_BUILD_ARTIFACT/workspace/icm.demo.core.app/target/icm.demo.core.app-0.7-SNAPSHOT/lib/res.jar to /home/appusr/.m2/repository/com/telvent/oip/icm.demo.core.app/0.7-SNAPSHOT/icm.demo.core.app-0.7-SNAPSHOT.jar
      Notifying upstream projects of job completion
      Join notifier requires a CauseAction
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 34.069s
      [INFO] Finished at: Mon Jul 21 16:51:28 CEST 2014
      [INFO] Final Memory: 44M/64M
      [INFO] ------------------------------------------------------------------------
      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
      org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
      	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: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:178)
      	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 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$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
      	at hudson.maven.Maven3Builder$MavenExecutionListener.sessionEnded(Maven3Builder.java:467)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	... 23 more
      [ERROR] 
      java.lang.NullPointerException
      	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:100)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:849)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535)
      	at hudson.model.Run.execute(Run.java:1732)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:234)
      project=hudson.maven.MavenModuleSet@9f85ec8[_BUILD_ARTIFACT]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      project.getModules()=[hudson.maven.MavenModule@a063a3d[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.core.app][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.core.app][relativePath:], hudson.maven.MavenModule@a063a50[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][relativePath:], hudson.maven.MavenModule@a0638d4[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole][relativePath:], hudson.maven.MavenModule@a19e59e[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole.webapp][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.flexconsole.webapp][relativePath:]]
      project.getRootModule()=hudson.maven.MavenModule@a063a50[_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][_BUILD_ARTIFACT/com.telvent.oip:icm.demo.database][relativePath:]
      [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/InternalErrorException
      FATAL: null
      java.lang.NullPointerException
      	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:100)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:849)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535)
      	at hudson.model.Run.execute(Run.java:1732)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:234)
      

      I have a parametrized multi-configuration project (BUILD_CORE_N_DB_ARTIFACTS) that triggers with every axis configuration the execution a simple maven proyect (_BUILD_ARTIFACT, that basically downloads an artifact from SCM repository (Subversion) and invokes "maven install" with some options. Everything is parameterized for _BUILD_ARTIFACT (even SVN URL). Once _BUILD_ARTIFACT finishes, _BUILD_CORE_N_DB_ARTIFACTS job grabs the resulting archived file using copy artifact plugin with the build number indicated in TRIGGERED_BUILD_NUMBER_BUILD_ARTIFACT environment variable.

      _BUILD_CORE_N_DB_ARTIFACTS performs a touchstone build first and then three artifacts are generated in parallel. One of these three artifacts (an EAR, a WAR and a ZIP with DB scripts) fails with NPE indicated above. It is not always the same artifact.

      I have tested this on latest (1.573) and previous (1.572) Jenkins versions with same results.

          [JENKINS-23903] NullPointeException in hudson.maven.Maven3Builder$MavenExecutionListener.sessionEnded

          Daniel Beck added a comment -

          Report needs to specify Maven Project plugin versions.

          Also, is this a regression from an earlier version? Did it ever work? What config changes happened since?

          Are you able to reproduce this issue in a simpler configuration, maybe one that can be reproduced by others?

          Daniel Beck added a comment - Report needs to specify Maven Project plugin versions. Also, is this a regression from an earlier version? Did it ever work? What config changes happened since? Are you able to reproduce this issue in a simpler configuration, maybe one that can be reproduced by others?

          I am not sure if this worked with previous versions. Used plugin versions are:
          -Maven Project Plugin: 1.2
          -Matrix Project Plugin: 1.2
          -Parameterized Trigger plugin: 2.25

          I suppose you could reproduce the problem by creating a parameterized Maven Project (_BUILD_ARTIFACT) that receives following string parameters: BASE_SCM_URL, ARTIFACT_NAME, ARTIFACT_BRANCH (default: "trunk"), PROJECT_GROUP, MAVEN_TARGETS (default: "clean install").

          This job downloads sources from an SCM repository (we use Subversion) located at: ${BASE_SCM_URL}/${PROJECT_GROUP}/${ARTIFACT_NAME}/${ARTIFACT_BRANCH} and specifies as local module directory: ${ARTIFACT_NAME}

          Build step consist of specifying pom.xml file with the ${MAVENN_TARGETS} in "Goals and options".

          Then create a parameterized multi-configuration project for three different artifact names (you can define the AXIS as "ARTIFACT_NAME") with a build step that simply triggers the execution of _BUILD_ARTIFACT job passing the required paramters and checking "Block until the triggered projects finish their builds" option.

          Fernando Miguelez added a comment - I am not sure if this worked with previous versions. Used plugin versions are: -Maven Project Plugin: 1.2 -Matrix Project Plugin: 1.2 -Parameterized Trigger plugin: 2.25 I suppose you could reproduce the problem by creating a parameterized Maven Project (_BUILD_ARTIFACT) that receives following string parameters: BASE_SCM_URL, ARTIFACT_NAME, ARTIFACT_BRANCH (default: "trunk"), PROJECT_GROUP, MAVEN_TARGETS (default: "clean install"). This job downloads sources from an SCM repository (we use Subversion) located at: ${BASE_SCM_URL}/${PROJECT_GROUP}/${ARTIFACT_NAME}/${ARTIFACT_BRANCH} and specifies as local module directory: ${ARTIFACT_NAME} Build step consist of specifying pom.xml file with the ${MAVENN_TARGETS} in "Goals and options". Then create a parameterized multi-configuration project for three different artifact names (you can define the AXIS as "ARTIFACT_NAME") with a build step that simply triggers the execution of _BUILD_ARTIFACT job passing the required paramters and checking "Block until the triggered projects finish their builds" option.

          We're getting the same error.

          2015-01-08 16:04:27 | [INFO] BUILD SUCCESS
          2015-01-08 16:04:27 | [INFO] ------------------------------------------------------------------------
          2015-01-08 16:04:27 | [INFO] Total time: 1:49.673s
          2015-01-08 16:04:27 | [INFO] Finished at: Thu Jan 08 16:04:27 EST 2015
          2015-01-08 16:04:27 | [INFO] Final Memory: 37M/390M
          2015-01-08 16:04:27 | [INFO] ------------------------------------------------------------------------
          2015-01-08 16:04:27 | mavenExecutionResult exceptions not empty
          2015-01-08 16:04:27 | message : Internal error: java.lang.NullPointerException
          2015-01-08 16:04:27 | cause : null
          2015-01-08 16:04:27 | Stack trace :
          2015-01-08 16:04:27 | org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
          2015-01-08 16:04:27 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
          2015-01-08 16:04:27 | at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
          2015-01-08 16:04:27 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          2015-01-08 16:04:27 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          2015-01-08 16:04:27 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          2015-01-08 16:04:27 | at java.lang.reflect.Method.invoke(Method.java:597)
          2015-01-08 16:04:27 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
          2015-01-08 16:04:27 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
          2015-01-08 16:04:27 | at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
          2015-01-08 16:04:27 | at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
          2015-01-08 16:04:27 | at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
          2015-01-08 16:04:27 | at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          2015-01-08 16:04:27 | at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          2015-01-08 16:04:27 | at hudson.remoting.Request$2.run(Request.java:326)
          2015-01-08 16:04:27 | at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          2015-01-08 16:04:27 | at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          2015-01-08 16:04:27 | at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          2015-01-08 16:04:27 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          2015-01-08 16:04:27 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          2015-01-08 16:04:27 | at java.lang.Thread.run(Thread.java:619)
          2015-01-08 16:04:27 | Caused by: java.lang.NullPointerException
          2015-01-08 16:04:27 | at hudson.maven.Maven3Builder$MavenExecutionListener.sessionEnded(Maven3Builder.java:292)
          2015-01-08 16:04:27 | at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
          2015-01-08 16:04:27 | at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          2015-01-08 16:04:27 | at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
          2015-01-08 16:04:27 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          2015-01-08 16:04:27 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          2015-01-08 16:04:27 | ... 19 more
          2015-01-08 16:04:27 | ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
          2015-01-08 16:04:27 | java.lang.NullPointerException
          2015-01-08 16:04:27 | at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:100)
          2015-01-08 16:04:27 | at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:769)
          2015-01-08 16:04:27 | at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
          2015-01-08 16:04:27 | at hudson.model.Run.execute(Run.java:1576)
          2015-01-08 16:04:27 | at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:486)
          2015-01-08 16:04:27 | at hudson.model.ResourceController.execute(ResourceController.java:88)
          2015-01-08 16:04:27 | at hudson.model.Executor.run(Executor.java:241)

          Nathan Deckard added a comment - We're getting the same error. 2015-01-08 16:04:27 | [INFO] BUILD SUCCESS 2015-01-08 16:04:27 | [INFO] ------------------------------------------------------------------------ 2015-01-08 16:04:27 | [INFO] Total time: 1:49.673s 2015-01-08 16:04:27 | [INFO] Finished at: Thu Jan 08 16:04:27 EST 2015 2015-01-08 16:04:27 | [INFO] Final Memory: 37M/390M 2015-01-08 16:04:27 | [INFO] ------------------------------------------------------------------------ 2015-01-08 16:04:27 | mavenExecutionResult exceptions not empty 2015-01-08 16:04:27 | message : Internal error: java.lang.NullPointerException 2015-01-08 16:04:27 | cause : null 2015-01-08 16:04:27 | Stack trace : 2015-01-08 16:04:27 | org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException 2015-01-08 16:04:27 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) 2015-01-08 16:04:27 | at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 2015-01-08 16:04:27 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2015-01-08 16:04:27 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 2015-01-08 16:04:27 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 2015-01-08 16:04:27 | at java.lang.reflect.Method.invoke(Method.java:597) 2015-01-08 16:04:27 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) 2015-01-08 16:04:27 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 2015-01-08 16:04:27 | at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) 2015-01-08 16:04:27 | at hudson.maven.Maven3Builder.call(Maven3Builder.java:100) 2015-01-08 16:04:27 | at hudson.maven.Maven3Builder.call(Maven3Builder.java:66) 2015-01-08 16:04:27 | at hudson.remoting.UserRequest.perform(UserRequest.java:118) 2015-01-08 16:04:27 | at hudson.remoting.UserRequest.perform(UserRequest.java:48) 2015-01-08 16:04:27 | at hudson.remoting.Request$2.run(Request.java:326) 2015-01-08 16:04:27 | at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 2015-01-08 16:04:27 | at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 2015-01-08 16:04:27 | at java.util.concurrent.FutureTask.run(FutureTask.java:138) 2015-01-08 16:04:27 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 2015-01-08 16:04:27 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 2015-01-08 16:04:27 | at java.lang.Thread.run(Thread.java:619) 2015-01-08 16:04:27 | Caused by: java.lang.NullPointerException 2015-01-08 16:04:27 | at hudson.maven.Maven3Builder$MavenExecutionListener.sessionEnded(Maven3Builder.java:292) 2015-01-08 16:04:27 | at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64) 2015-01-08 16:04:27 | at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) 2015-01-08 16:04:27 | at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170) 2015-01-08 16:04:27 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 2015-01-08 16:04:27 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 2015-01-08 16:04:27 | ... 19 more 2015-01-08 16:04:27 | ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com 2015-01-08 16:04:27 | java.lang.NullPointerException 2015-01-08 16:04:27 | at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:100) 2015-01-08 16:04:27 | at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:769) 2015-01-08 16:04:27 | at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) 2015-01-08 16:04:27 | at hudson.model.Run.execute(Run.java:1576) 2015-01-08 16:04:27 | at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:486) 2015-01-08 16:04:27 | at hudson.model.ResourceController.execute(ResourceController.java:88) 2015-01-08 16:04:27 | at hudson.model.Executor.run(Executor.java:241)

            Unassigned Unassigned
            fmiguelez Fernando Miguelez
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: