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

NullPointerException when running Maven job

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.413, Maven Integration plugin 1.413
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          provegard 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.

          Show
          provegard 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.
          Hide
          kutzi kutzi added a comment -

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

          Show
          kutzi kutzi added a comment - You're right. I was confusing this with 'Build modules in parallel'. Sorry for the confusion
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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

            People

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

              Dates

              Created:
              Updated:
              Resolved: