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

java.lang.NullPointerException after the build successfull

    XMLWordPrintable

    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
          scrutton Paul added a comment - - edited

          I'm a novice Jenkins user, and have a small shell job setup to use the Accurev plugin to grab code/compile/run a Java Hello World program, redirect the program output to a file and cat the output file to the console.

          cd HelloWorldProgram
          javac HelloWorld.java
          java HelloWorld > outputFile
          cat outputFile

          After the last operation is performed I see the following in the console output:

          + cd HelloWorldProgram
          + javac HelloWorld.java
          + java HelloWorld
          + cat outputFile
          Hello, World
          FATAL: null
          java.lang.NullPointerException
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:703)
          at hudson.model.Run.execute(Run.java:1932)
          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

          I note that the top 2 line numbers are slightly different than other user's - I may be running a different version of Jenkins perhaps. Is this > 2 year old problem really not fixed yet?

          Environment Variables reveals that JENKINS_VERSION = 2.263.1. 
          ACCUREV_VERSION is not visible (ACCUREV_VERSION {ACCUREV_VERSION}).

          Show
          scrutton Paul added a comment - - edited I'm a novice Jenkins user, and have a small shell job setup to use the Accurev plugin to grab code/compile/run a Java Hello World program, redirect the program output to a file and cat the output file to the console. cd HelloWorldProgram javac HelloWorld.java java HelloWorld > outputFile cat outputFile After the last operation is performed I see the following in the console output: + cd HelloWorldProgram + javac HelloWorld.java + java HelloWorld + cat outputFile Hello, World FATAL: null java.lang.NullPointerException at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:703) at hudson.model.Run.execute(Run.java:1932) 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 I note that the top 2 line numbers are slightly different than other user's - I may be running a different version of Jenkins perhaps. Is this > 2 year old problem really not fixed yet? Environment Variables reveals that JENKINS_VERSION = 2.263.1.  ACCUREV_VERSION is not visible (ACCUREV_VERSION {ACCUREV_VERSION}).
          Hide
          johns_jenkins Johns added a comment - - edited

          I would like to start my comment by thanking all of you in your contribution to design/development of Jenkins and Jenkins AccuRev plugin and to your contribution to the OpenSource community overall.

          In my organization, we have setup multiple Jenkins jobs and most of them integrate with AccuRev plugin to download the code and subsequently build the project. Some of the jobs, especially the ones that run from Linux Servers consistently fail in the last step with the error reported in this JENKINS-56882 ticket. The job does what is expected. Retrieves the code from AccuRev, and performs all the subsequent tasks. However at the very end, it reports failure. We have been ignoring these failed jobs since the jobs accomplish the expected activities.

          With this bug, it will be difficult to know whether the job actually failed, or it is showing a failed status due to this bug. This bug will be an hindrance to take this automated process to upper tiers in controlled environments (TEST / PROD) where the IT will not know the correct status of the job, and unable provide adequate & timely support.  

          Complete automation is impossible due to this bug as it does not allow for correct exit status tracking. We consider this issue critical and precluding our progress with Jenkins and AccuRev plugin

          What is the roadmap to fix this bug ? Your response and attention to fix this issue is much appreciated.

          Thanks, Johns

           

          Show
          johns_jenkins Johns added a comment - - edited I would like to start my comment by thanking all of you in your contribution to design/development of Jenkins and Jenkins AccuRev plugin and to your contribution to the OpenSource community overall. In my organization, we have setup multiple Jenkins jobs and most of them integrate with AccuRev plugin to download the code and subsequently build the project. Some of the jobs, especially the ones that run from Linux Servers consistently fail in the last step with the error reported in this JENKINS-56882 ticket. The job does what is expected. Retrieves the code from AccuRev, and performs all the subsequent tasks. However at the very end, it reports failure. We have been ignoring these failed jobs since the jobs accomplish the expected activities. With this bug, it will be difficult to know whether the job actually failed, or it is showing a failed status due to this bug. This bug will be an hindrance to take this automated process to upper tiers in controlled environments (TEST / PROD) where the IT will not know the correct status of the job, and unable provide adequate & timely support.   Complete automation is impossible due to this bug as it does not allow for correct exit status tracking. We consider this issue critical and precluding our progress with Jenkins and AccuRev plugin What is the roadmap to fix this bug ? Your response and attention to fix this issue is much appreciated. Thanks, Johns  
          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 ?
          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
          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
          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.

            People

            Assignee:
            jetersen Joseph Petersen
            Reporter:
            amrutha Amrutha Varshini DR
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated: