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

NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:432)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None
    • Hudson 1.351, Maven 2.2.1

      I've got this exception while running the build:

      ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net
      java.lang.NullPointerException
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:432)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      at hudson.model.Run.run(Run.java:1240)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:122)

      This seems to be similar to http://markmail.org/message/ni72qrruszvzp63m
      However, I'm on Hudson 1.351, so the bug should have been fixed in it, right?

      I've also a Maven job with incremental build option.
      The module with the changes had already been build before. The 3 builds before this failing build, however, were aborted manually.

      Deactivating the incremental build option and starting the build manually helped.

          [JENKINS-6429] NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:432)

          kutzi created issue -

          I'm having a similar problem with Hudson 1.356
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:435)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
          at hudson.model.Run.run(Run.java:1244)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:122)

          Vincent Latombe added a comment - I'm having a similar problem with Hudson 1.356 java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:435) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1244) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122)

          I just runned the incriminating job once again, and it seems to be due to a duplicated module.

          Vincent Latombe added a comment - I just runned the incriminating job once again, and it seems to be due to a duplicated module.

          kutzi added a comment -

          As far as I can reconstruct it, no duplicate module has been involved in my case.

          kutzi added a comment - As far as I can reconstruct it, no duplicate module has been involved in my case.
          kutzi made changes -
          Assignee New: Andrew Bayer [ abayer ]

          Andrew Bayer added a comment -

          I'm not sure if I'm going to have time to look into this for a while due to work - check with Kohsuke to see if he can take a look.

          Andrew Bayer added a comment - I'm not sure if I'm going to have time to look into this for a while due to work - check with Kohsuke to see if he can take a look.
          Andrew Bayer made changes -
          Assignee Original: Andrew Bayer [ abayer ]

          kutzi added a comment -

          Strange. I did a view on the source code and it looks to me pretty much impossible that a NPE is happening there.

          The line 432 resp. 435 is
          if ((mb.getPreviousBuiltBuild() == null) ||

          while mb is instantiated some lines earlier with
          MavenBuild mb = m.newBuild();

          And it looks like newBuild() can never return null

          kutzi added a comment - Strange. I did a view on the source code and it looks to me pretty much impossible that a NPE is happening there. The line 432 resp. 435 is if ((mb.getPreviousBuiltBuild() == null) || while mb is instantiated some lines earlier with MavenBuild mb = m.newBuild(); And it looks like newBuild() can never return null

          kutzi added a comment -

          I just had the exact same problem again. Again, the previous build was aborted manually, so that seems to be the cause (there were no aborted builds in the mean time).
          Starting the full build by manually triggering the job, fixed it again.

          kutzi added a comment - I just had the exact same problem again. Again, the previous build was aborted manually, so that seems to be the cause (there were no aborted builds in the mean time). Starting the full build by manually triggering the job, fixed it again.

          kutzi added a comment -

          I think this could be the offending line:

          (mb.getPreviousBuiltBuild().getResult().isWorseThan(Result.SUCCESS)))

          I've seen before that a build Result could be null for aborted builds - maybe the best way is to make sure that getResult() will never return null as it is quite intuitive to assume that getResult() (at least for a past job) will never return null.

          Still wonder why the reported line number in the stacktrace is incorrect.

          kutzi added a comment - I think this could be the offending line: (mb.getPreviousBuiltBuild().getResult().isWorseThan(Result.SUCCESS))) I've seen before that a build Result could be null for aborted builds - maybe the best way is to make sure that getResult() will never return null as it is quite intuitive to assume that getResult() (at least for a past job) will never return null. Still wonder why the reported line number in the stacktrace is incorrect.

            abayer Andrew Bayer
            kutzi kutzi
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: