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

NullPointer when trying to retrieve Configuration

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: claim-plugin
    • Labels:
      None
    • Environment:
      jenkins 2.90
      claim plugin 2.10
    • Similar Issues:

      Description

      After a build failure due to failed unit tests following Exception is logged:

      ERROR: Build step failed with exception
      java.lang.NullPointerException
      	at hudson.plugins.claim.AbstractClaimBuildAction.<init>(AbstractClaimBuildAction.java:43)
      	at hudson.plugins.claim.ClaimBuildAction.<init>(ClaimBuildAction.java:14)
      	at hudson.plugins.claim.ClaimPublisher.perform(ClaimPublisher.java:62)
      	at hudson.plugins.claim.ClaimPublisher.perform(ClaimPublisher.java:53)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	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:1749)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:421)
      Build step 'Allow broken build claiming' marked build as failure
      

      Looks like ClaimConfig.get() is null.

      Seems like in claim plugin version 2.7 everything was fine (but I'm not sure about this)

        Attachments

          Issue Links

            Activity

            Hide
            mdiallo Mouhamadou Diallo added a comment - - edited

            I try to use it on my pipeline and got the same result as upper.
            Groovy pipeline I used

            node('master'){
             try {
            
             sh "please_fail"
            } catch (err) {
             currentBuild.result = hudson.model.Result.FAILURE.toString()
             step([$class: 'ClaimPublisher']) 
            } 
            }
            
            Show
            mdiallo Mouhamadou Diallo added a comment - - edited I try to use it on my pipeline and got the same result as upper. Groovy pipeline I used node('master'){ try { sh "please_fail" } catch (err) { currentBuild.result = hudson.model.Result.FAILURE.toString() step([$class: 'ClaimPublisher']) } }
            Hide
            advorsky73 Alexander Dvorsky added a comment -
            00:14:00 Recording test results
            00:14:00 ERROR: Build step failed with exception
            00:14:00 java.lang.NullPointerException
            00:14:00 at hudson.plugins.claim.AbstractClaimBuildAction.<init>(AbstractClaimBuildAction.java:43)
            00:14:00 at hudson.plugins.claim.ClaimTestAction.<init>(ClaimTestAction.java:13)
            00:14:00 at hudson.plugins.claim.ClaimTestDataPublisher$Data.getTestAction(ClaimTestDataPublisher.java:85)
            00:14:00 at hudson.tasks.junit.TestResultAction.getActions(TestResultAction.java:227)
            00:14:00 at hudson.tasks.test.TestObject.getTestActions(TestObject.java:234)
            00:14:00 at hudson.tasks.test.TestObject.getTestAction(TestObject.java:247)
            00:14:00 at hudson.plugins.claim.ClaimTestDataPublisher.contributeTestData(ClaimTestDataPublisher.java:37)
            00:14:00 at hudson.plugins.claim.ClaimTestDataPublisher.contributeTestData(ClaimTestDataPublisher.java:24)
            00:14:00 at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:199)
            00:14:00 at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:153)
            00:14:00 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
            00:14:00 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
            00:14:00 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
            00:14:00 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:682)
            00:14:00 at hudson.model.Build$BuildExecution.post2(Build.java:186)
            00:14:00 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627)
            00:14:00 at hudson.model.Run.execute(Run.java:1762)
            00:14:00 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            00:14:00 at hudson.model.ResourceController.execute(ResourceController.java:97)
            00:14:00 at hudson.model.Executor.run(Executor.java:421)
            00:14:00 Build step 'Publish JUnit test result report' marked build as failure
            

            Same in our Installation...

            Jenkins 2.73.3

            Claim Plugin 2.10

            I will try to revert to claim 2.9 and see if this still happens...

            Show
            advorsky73 Alexander Dvorsky added a comment - 00:14:00 Recording test results 00:14:00 ERROR: Build step failed with exception 00:14:00 java.lang.NullPointerException 00:14:00 at hudson.plugins.claim.AbstractClaimBuildAction.<init>(AbstractClaimBuildAction.java:43) 00:14:00 at hudson.plugins.claim.ClaimTestAction.<init>(ClaimTestAction.java:13) 00:14:00 at hudson.plugins.claim.ClaimTestDataPublisher$Data.getTestAction(ClaimTestDataPublisher.java:85) 00:14:00 at hudson.tasks.junit.TestResultAction.getActions(TestResultAction.java:227) 00:14:00 at hudson.tasks.test.TestObject.getTestActions(TestObject.java:234) 00:14:00 at hudson.tasks.test.TestObject.getTestAction(TestObject.java:247) 00:14:00 at hudson.plugins.claim.ClaimTestDataPublisher.contributeTestData(ClaimTestDataPublisher.java:37) 00:14:00 at hudson.plugins.claim.ClaimTestDataPublisher.contributeTestData(ClaimTestDataPublisher.java:24) 00:14:00 at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:199) 00:14:00 at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:153) 00:14:00 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) 00:14:00 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 00:14:00 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736) 00:14:00 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:682) 00:14:00 at hudson.model.Build$BuildExecution.post2(Build.java:186) 00:14:00 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627) 00:14:00 at hudson.model.Run.execute(Run.java:1762) 00:14:00 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:14:00 at hudson.model.ResourceController.execute(ResourceController.java:97) 00:14:00 at hudson.model.Executor.run(Executor.java:421) 00:14:00 Build step 'Publish JUnit test result report' marked build as failure Same in our Installation... Jenkins 2.73.3 Claim Plugin 2.10 I will try to revert to claim 2.9 and see if this still happens...
            Hide
            fredericmeyrou Frédéric Meyrou added a comment - - edited

            SAme problem with standard Jobs.

            Reverting to V2.9 fix the NPE.

            my configuration : Windows W2K12 + Jenkins latest LTS + up to date plugins

            Show
            fredericmeyrou Frédéric Meyrou added a comment - - edited SAme problem with standard Jobs. Reverting to V2.9 fix the NPE. my configuration : Windows W2K12 + Jenkins latest LTS + up to date plugins
            Hide
            scharles Sebastien Charles added a comment -

            +1

            Show
            scharles Sebastien Charles added a comment - +1
            Hide
            npfistner Norbert Pfistner added a comment -

            The NPE also occurs sometimes when build itself is fine.

            Also configuration section of the plugin defaults has vanished from the system configuration page in jenkins.

            Unfortunately the update center does not provide a 'revert to 2.9' button.
            Is there any way to revert to 2.9 manually?

            Show
            npfistner Norbert Pfistner added a comment - The NPE also occurs sometimes when build itself is fine. Also configuration section of the plugin defaults has vanished from the system configuration page in jenkins. Unfortunately the update center does not provide a 'revert to 2.9' button. Is there any way to revert to 2.9 manually?
            Hide
            npfistner Norbert Pfistner added a comment -

            I was able to revert to 2.9 manually.

            Now I can also confirm now that 2.9 does show this bug. The bug was introduced with claim plugin 2.10

            Show
            npfistner Norbert Pfistner added a comment - I was able to revert to 2.9 manually. Now I can also confirm now that 2.9 does show this bug. The bug was introduced with claim plugin 2.10
            Hide
            advorsky73 Alexander Dvorsky added a comment -

            Confirmed as well. bug is not present in 2.9

            Show
            advorsky73 Alexander Dvorsky added a comment - Confirmed as well. bug is not present in 2.9
            Hide
            greybird Arnaud TAMAILLON added a comment -

            This issue might be linked to JENKINS-47972.

            I will issue a fix, and produce a 2.11 version.

            Feel free to indicate if this fixes the issue.

             

             

            Show
            greybird Arnaud TAMAILLON added a comment - This issue might be linked to JENKINS-47972 . I will issue a fix, and produce a 2.11 version. Feel free to indicate if this fixes the issue.    
            Hide
            npfistner Norbert Pfistner added a comment -

            First quick test looks promising.
            I'll do some more testing ...

            Show
            npfistner Norbert Pfistner added a comment - First quick test looks promising. I'll do some more testing ...
            Hide
            greybird Arnaud TAMAILLON added a comment -

            Thanks for your feedback.

            Let me know if you think we can close this issue, or if you think the fix is incomplete.

            Show
            greybird Arnaud TAMAILLON added a comment - Thanks for your feedback. Let me know if you think we can close this issue, or if you think the fix is incomplete.
            Hide
            npfistner Norbert Pfistner added a comment -

            We had round about 40 jobs running the last 21 hours without any problem concerning the claim plugin.

            Looks like the bug has been fixed.

            Many Thank's!

            Show
            npfistner Norbert Pfistner added a comment - We had round about 40 jobs running the last 21 hours without any problem concerning the claim plugin. Looks like the bug has been fixed. Many Thank's!
            Hide
            greybird Arnaud TAMAILLON added a comment -

            Thanks for your confirmation & help on this topic!

            Show
            greybird Arnaud TAMAILLON added a comment - Thanks for your confirmation & help on this topic!
            Hide
            greybird Arnaud TAMAILLON added a comment -

            Fixes in 2.11

            Show
            greybird Arnaud TAMAILLON added a comment - Fixes in 2.11

              People

              • Assignee:
                greybird Arnaud TAMAILLON
                Reporter:
                npfistner Norbert Pfistner
              • Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: