• 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

          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.

          Per Rovegård added a comment -

          Sorry, but aren't you talking about two different things? My understanding of Maven's parallel build feature is that it allows Maven to build some modules in a multi-module project concurrently if the dependency graph allows it (and if the plugins are thread safe). But we're using the concurrent builds feature of Jenkins to run many jobs/builds concurrently. Specifically, a build is triggered as soon as someone pushes a commit for review to our Gerrit server. With concurrent builds, the machine is obviously utilized better - the alternative is a build queue with a lot of pending builds.

          Per Rovegård added a comment - Sorry, but aren't you talking about two different things? My understanding of Maven's parallel build feature is that it allows Maven to build some modules in a multi-module project concurrently if the dependency graph allows it (and if the plugins are thread safe). But we're using the concurrent builds feature of Jenkins to run many jobs/builds concurrently. Specifically, a build is triggered as soon as someone pushes a commit for review to our Gerrit server. With concurrent builds, the machine is obviously utilized better - the alternative is a build queue with a lot of pending builds.

          kutzi added a comment -

          You're right. I was confusing this with 'Build modules in parallel'. Sorry for the confusion

          kutzi added a comment - You're right. I was confusing this with 'Build modules in parallel'. Sorry for the confusion

          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

          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

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

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/maven/MavenBuild.java http://jenkins-ci.org/commit/maven-plugin/d338eb6a030663b2870d05ba815c5ef683f41f3b Log: [FIXED JENKINS-9822] occasional NPE when running maven jobs Originally-Committed-As: 345b3bb3743f93a797c843bfc51d95a90093f144

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

              Created:
              Updated:
              Resolved: