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

java.lang.NullPointerException after the build successfull

    Details

    • Similar Issues:

      Description

      FATAL: null
      java.lang.NullPointerException
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:640)
      at hudson.model.Run.execute(Run.java:1841)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE

        Attachments

          Activity

          Hide
          mwaldorf Michael Waldorf added a comment -

          I encountered this issue using Jenkins 2.150.3, Accurev plugin 0.7.20, and Ant plugin 1.9.  The issue traced back in my case to RunWithSCM.super.getCulprits returning null when it shouldn't be able to.  I was able to roll back to 0.7.13 of the Accurev plugin and the issue went away.

          Show
          mwaldorf Michael Waldorf added a comment - I encountered this issue using Jenkins 2.150.3, Accurev plugin 0.7.20, and Ant plugin 1.9.  The issue traced back in my case to RunWithSCM.super.getCulprits returning null when it shouldn't be able to.  I was able to roll back to 0.7.13 of the Accurev plugin and the issue went away.
          Hide
          danieljk17 Daniel Koning added a comment -

          Hello,

          I am running into this problem pretty regularly.  I am using AccuRev plugin 0.7.22 and have been fixing it by rolling back the AccuRev plugin to 0.7.13 and then back to 0.7.22.  It seems to start happening when we edit the view tab for only one of our view/tab of projects.  We have some post-build steps set up, but either it errors out in MailSender (see output1), or if I remove the post build Email Notification step I get a shorter stack (see output2).  Any idea if the problem can be fixed anytime soon?

           

          output1:

          build status is: 0
          [TextFinder plugin] Scanning console output...
          [TextFinder plugin] Finished looking for pattern 'EXIT OCCURRED WITH WARNINGS!' in the console output
          RTP: Started!
          RTP: Done!
          [description- setter] Description set: CI:selected, anonymous
          ERROR: Build step failed with exception
          java.lang.NullPointerException
          at hudson.tasks.MailSender.getUserEmailList(MailSender.java:458)
          at hudson.tasks.MailSender.createEmptyMail(MailSender.java:389)
          at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:204)
          at hudson.tasks.MailSender.createMail(MailSender.java:195)
          at hudson.tasks.MailSender.run(MailSender.java:112)
          at hudson.tasks.Mailer.perform(Mailer.java:173)
          at hudson.tasks.Mailer.perform(Mailer.java:136)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
          at hudson.model.Build$BuildExecution.post2(Build.java:186)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
          at hudson.model.Run.execute(Run.java:1843)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:429)
          Build step 'E- mail Notification' marked build as failure
          FATAL: null
          java.lang.NullPointerException
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:640)
          at hudson.model.Run.execute(Run.java:1843)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:429)
          Notifying upstream projects of job completion
          Finished: FAILURE

           

          Output 2 (without post build mail step configured):
          FATAL: null
          java.lang.NullPointerException
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:640)
          at hudson.model.Run.execute(Run.java:1843)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:429)
          Notifying upstream projects of job completion
          Finished: FAILURE

           

           

          Show
          danieljk17 Daniel Koning added a comment - Hello, I am running into this problem pretty regularly.  I am using AccuRev plugin 0.7.22 and have been fixing it by rolling back the AccuRev plugin to 0.7.13 and then back to 0.7.22.  It seems to start happening when we edit the view tab for only one of our view/tab of projects.  We have some post-build steps set up, but either it errors out in MailSender (see output1), or if I remove the post build Email Notification step I get a shorter stack (see output2).  Any idea if the problem can be fixed anytime soon?   output1: build status is: 0 [TextFinder plugin] Scanning console output... [TextFinder plugin] Finished looking for pattern 'EXIT OCCURRED WITH WARNINGS!' in the console output RTP: Started! RTP: Done! [description- setter] Description set: CI:selected, anonymous ERROR: Build step failed with exception java.lang.NullPointerException at hudson.tasks.MailSender.getUserEmailList(MailSender.java:458) at hudson.tasks.MailSender.createEmptyMail(MailSender.java:389) at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:204) at hudson.tasks.MailSender.createMail(MailSender.java:195) at hudson.tasks.MailSender.run(MailSender.java:112) at hudson.tasks.Mailer.perform(Mailer.java:173) at hudson.tasks.Mailer.perform(Mailer.java:136) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step 'E- mail Notification' marked build as failure FATAL: null java.lang.NullPointerException at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:640) at hudson.model.Run.execute(Run.java:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Notifying upstream projects of job completion Finished: FAILURE   Output 2 (without post build mail step configured): FATAL: null java.lang.NullPointerException at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:640) at hudson.model.Run.execute(Run.java:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Notifying upstream projects of job completion Finished: FAILURE    
          Hide
          arnom Arno Moonen added a comment - - edited

          I'm also seeing this. In my particular case, we had a new member join our team and she had never logged in to Jenkins CI yet, but did promote changes in AccuRev using her own account.
          This meant that the user was not yet known in Jenkins CI, so I figured this might be related.
          I've just asked her to log in to Jenkins CI ones and I'm rerunning the build that failed with this NPE now. Let's hope it succeeds this time. Perhaps that might give some useful information about the root cause.

          Update: After she's logged in and the user with the same name existed, I'm not getting this exception anymore.

          Show
          arnom Arno Moonen added a comment - - edited I'm also seeing this. In my particular case, we had a new member join our team and she had never logged in to Jenkins CI yet, but did promote changes in AccuRev using her own account. This meant that the user was not yet known in Jenkins CI, so I figured this might be related. I've just asked her to log in to Jenkins CI ones and I'm rerunning the build that failed with this NPE now. Let's hope it succeeds this time. Perhaps that might give some useful information about the root cause. Update: After she's logged in and the user with the same name existed, I'm not getting this exception anymore.
          Hide
          arnom Arno Moonen added a comment -

          As mentioned in my comment on GitHub, I think this might be caused by the call to User.getById in AccuRevTransaction::setUser(String author).
          The second argument (which indicates if a new user should be created) is set to false. Perhaps it should just be changed to true?

          Show
          arnom Arno Moonen added a comment - As mentioned in my comment on GitHub , I think this might be caused by the call to User.getById in AccuRevTransaction::setUser(String author) . The second argument (which indicates if a new user should be created) is set to false . Perhaps it should just be changed to true ?

            People

            • Assignee:
              jetersen Joseph Petersen
              Reporter:
              amrutha Amrutha Varshini DR
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: