• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Jenkins 1.413, Maven Integration plugin 1.413

      I have a Maven job that fails occasionally with the following message:

      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.NullPointerException
      	at hudson.maven.MavenBuild$ProxyImpl2.close(MavenBuild.java:560)
      	at hudson.maven.Maven3Builder.end(Maven3Builder.java:220)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:723)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
      	at hudson.model.Run.run(Run.java:1374)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:467)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:145)
      project=hudson.maven.MavenModuleSet@70f5f42b[MVN Gerrit Verification]
      project.getModules()=[hudson.maven.MavenModule@cebeab4[...(omitted)...]
      project.getRootModule()=hudson.maven.MavenModule@416baa61[...(omitted)...]
      FATAL: null
      java.lang.NullPointerException
      	at hudson.maven.MavenBuild$ProxyImpl2.close(MavenBuild.java:560)
      	at hudson.maven.Maven3Builder.end(Maven3Builder.java:220)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:723)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
      	at hudson.model.Run.run(Run.java:1374)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:467)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:145)
      

      The workaround is to re-trigger the job. I don't know the exact failure rate, but let's say 1 in 4 or 5.

          [JENKINS-9822] NullPointerException when running Maven job

          Per Rovegård created issue -
          kutzi made changes -
          Assignee New: kutzi [ kutzi ]

          kutzi added a comment -

          Strange, NPE says that a module build has no parent - i.e. aggregator build.
          Is this a multi-module project?

          kutzi added a comment - Strange, NPE says that a module build has no parent - i.e. aggregator build. Is this a multi-module project?

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          maven-plugin/src/main/java/hudson/maven/MavenBuild.java
          http://jenkins-ci.org/commit/jenkins/345b3bb3743f93a797c843bfc51d95a90093f144
          Log:
          [FIXED JENKINS-9822] occasional NPE when running maven jobs

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html maven-plugin/src/main/java/hudson/maven/MavenBuild.java http://jenkins-ci.org/commit/jenkins/345b3bb3743f93a797c843bfc51d95a90093f144 Log: [FIXED JENKINS-9822] occasional NPE when running maven jobs
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          dogfood added a comment -

          Integrated in jenkins_main_trunk #957
          [FIXED JENKINS-9822] occasional NPE when running maven jobs

          Christoph Kutzinski : 345b3bb3743f93a797c843bfc51d95a90093f144
          Files :

          • changelog.html
          • maven-plugin/src/main/java/hudson/maven/MavenBuild.java

          dogfood added a comment - Integrated in jenkins_main_trunk #957 [FIXED JENKINS-9822] occasional NPE when running maven jobs Christoph Kutzinski : 345b3bb3743f93a797c843bfc51d95a90093f144 Files : changelog.html maven-plugin/src/main/java/hudson/maven/MavenBuild.java

          Per Rovegård added a comment -

          Yes, this is a multi-module project. But why does the build only fail sometimes? Is it a race condition of some sort?

          Per Rovegård added a comment - Yes, this is a multi-module project. But why does the build only fail sometimes? Is it a race condition of some sort?

          kutzi added a comment -

          I'm not sure. It looks like the parent MavenModuleSet build is gone. Do you have any 'unusual' job configuration. Concurrent builds maybe?

          kutzi added a comment - I'm not sure. It looks like the parent MavenModuleSet build is gone. Do you have any 'unusual' job configuration. Concurrent builds maybe?

          Per Rovegård added a comment -

          Yes, we have concurrent builds enabled with three executors.

          Per Rovegård added a comment - Yes, we have concurrent builds enabled with three executors.

          kutzi added a comment -

          That might be the reason. AFAIK concurrent builds where never considered being 'stable'.
          Given that Maven 3 comes with build-in support for concurrent builds - which is presumably much more stable -, we should maven deprecate it - or integrate it with Maven 3's option.

          kutzi added a comment - That might be the reason. AFAIK concurrent builds where never considered being 'stable'. Given that Maven 3 comes with build-in support for concurrent builds - which is presumably much more stable -, we should maven deprecate it - or integrate it with Maven 3's option.

            kutzi kutzi
            provegard Per Rovegård
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: