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

NullPointerException when running Maven job parallel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • jenkins LTS: 1.609.1
      maven-plugin: 2.9
      build-flow-plugin: 0.17
      Apache Maven: 3.2.2

      One Job is triggered by the build-flow-plugin to run parallel
      Each Job-Instance get its own workspace:

      ./workspace/${JOB_NAME}/${WS_EXTENSION}
      

      When parallel build is enabled, an NullPointerException raises.

      // 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")
          }
      )
      
      // 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
      

            Unassigned Unassigned
            phil_ Philipp Strobel
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: