java.lang.NullPointerException

Jenkins JIRA | Philipp Strobel | 2 years ago
  1. 0

    One Job is triggered by the build-flow-plugin to run parallel Each Job-Instance get its own workspace: {code:java} ./workspace/${JOB_NAME}/${WS_EXTENSION} {code} When parallel build is enabled, an NullPointerException raises. {code:java} // BUILD FLOW def SVN_REVISION = build.buildVariableResolver.resolve("SVN_REVISION") def SVN_SUB_DIR = build.buildVariableResolver.resolve("SVN_SUB_DIR") def SVN_ROOT = "https://<svn-server>/<directory>" parallel ( {pg06 = build( "FW_package_maven", WS_EXTENSION: "package1", SVN_URL: "$SVN_ROOT/$SVN_SUB_DIR", SVN_REVISION: "$SVN_REVISION", BUILD_LABEL: "linux") }, {pg07 = build( "FW_package_maven", WS_EXTENSION: "package2", SVN_URL: "$SVN_ROOT/$SVN_SUB_DIR", SVN_REVISION: "$SVN_REVISION", BUILD_LABEL: "linux") } ) {code} {code:java} // IN JOB "FW_package_maven" ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.129 s [INFO] Finished at: 2015-06-09T15:48:10+02:00 [INFO] Final Memory: 18M/103M [INFO] ------------------------------------------------------------------------ ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com java.lang.NullPointerException at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:855) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) project=hudson.maven.MavenModuleSet@6f47dd8d[MSK-FW_package_maven] project.getModules()=[hudson.maven.MavenModule@65f57b69[xxx], hudson.maven.MavenModule@3a0637c3[xxx][relativePath:]] project.getRootModule()=hudson.maven.MavenModule@65f57b69[xxx][xxx][relativePath:] FATAL: null java.lang.NullPointerException at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:855) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Finished: FAILURE {code}

    Jenkins JIRA | 2 years ago | Philipp Strobel
    java.lang.NullPointerException
  2. 0

    One Job is triggered by the build-flow-plugin to run parallel Each Job-Instance get its own workspace: {code:java} ./workspace/${JOB_NAME}/${WS_EXTENSION} {code} When parallel build is enabled, an NullPointerException raises. {code:java} // BUILD FLOW def SVN_REVISION = build.buildVariableResolver.resolve("SVN_REVISION") def SVN_SUB_DIR = build.buildVariableResolver.resolve("SVN_SUB_DIR") def SVN_ROOT = "https://<svn-server>/<directory>" parallel ( {pg06 = build( "FW_package_maven", WS_EXTENSION: "package1", SVN_URL: "$SVN_ROOT/$SVN_SUB_DIR", SVN_REVISION: "$SVN_REVISION", BUILD_LABEL: "linux") }, {pg07 = build( "FW_package_maven", WS_EXTENSION: "package2", SVN_URL: "$SVN_ROOT/$SVN_SUB_DIR", SVN_REVISION: "$SVN_REVISION", BUILD_LABEL: "linux") } ) {code} {code:java} // IN JOB "FW_package_maven" ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.129 s [INFO] Finished at: 2015-06-09T15:48:10+02:00 [INFO] Final Memory: 18M/103M [INFO] ------------------------------------------------------------------------ ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com java.lang.NullPointerException at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:855) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) project=hudson.maven.MavenModuleSet@6f47dd8d[MSK-FW_package_maven] project.getModules()=[hudson.maven.MavenModule@65f57b69[xxx], hudson.maven.MavenModule@3a0637c3[xxx][relativePath:]] project.getRootModule()=hudson.maven.MavenModule@65f57b69[xxx][xxx][relativePath:] FATAL: null java.lang.NullPointerException at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:855) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Finished: FAILURE {code}

    Jenkins JIRA | 2 years ago | Philipp Strobel
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 7197#167542941

    GitHub | 11 months ago | jerrinot
    java.lang.NullPointerException
  5. 0

    prerequisite: at least one running maven job 1. open Manage Jenkins - Configure System 2. click add maven 3. click delete installer 4. move the (empty) maven to the top of the list of maven installations 5. click save 6. run the maven job expected: maven job runs as before result: ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com java.lang.NullPointerException at hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1484) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) project=hudson.maven.MavenModuleSet@16c8cb41 [... some list of modules here ... ] FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSet.getMaven(MavenModuleSet.java:982) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:160) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:568) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1484) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) my hudson.tasks.Maven.xml looks like this: <?xml version='1.0' encoding='UTF-8'?> <hudson.tasks.Maven_-DescriptorImpl> <helpRedirect/> <installations> <hudson.tasks.Maven_-MavenInstallation> <properties> <hudson.tools.InstallSourceProperty> <installers/> </hudson.tools.InstallSourceProperty> </properties> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-2.0.11 (depreciated - for Java 1.4 only)</name> <home>/var/hudson/tools/maven-bin/maven-2.0.11</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-2.2.1 (Java 1.5+ required)</name> <home>/var/hudson/tools/maven-bin/maven-2.2.1</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> <hudson.tasks.Maven_-MavenInstallation> <name>/cvsroot/maven/maven-bin/maven-3.0.x</name> <home>/var/hudson/tools/maven-bin/maven-3.0.x</home> <properties/> </hudson.tasks.Maven_-MavenInstallation> </installations> </hudson.tasks.Maven_-DescriptorImpl> the fix is simple: just delete the empty maven configuration

    Jenkins JIRA | 4 years ago | Florian Rosenauer
    java.lang.NullPointerException

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.maven.AbstractMavenBuilder.end()
    2. Hudson Maven Embedder
      MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun
      1. hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:101)
      2. hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:855)
      2 frames
    3. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
      2. hudson.model.Run.execute(Run.java:1741)
      2 frames
    4. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      1 frame
    5. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:374)
      2 frames