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

NPE when trying to use claim plugin after upgrading to jenkins 2.191

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.16

      Description

      After Upgrading to 2.191 the claim plugin comes up with an NPE Exception.
      Before the upgrade everything was fine when using teh claim plugin.

      Szenario/Workflow

      1. Give I have an job worth claiming
      2. When I click on "claim it"
      3. Then the Clain Details are shown
      4. When I click on "claim" Button
      5. Then an error page with stacktrace comes up
      Stack-Trace
      
      java.lang.NullPointerException
      	at hudson.plugins.claim.ClaimBuildFailureAnalyzer.isBFAEnabled(ClaimBuildFailureAnalyzer.java:46)
      	at hudson.plugins.claim.AbstractClaimBuildAction.doClaim(AbstractClaimBuildAction.java:105)
      	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
      	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
      

        Attachments

          Activity

          Hide
          kddubb Kevin Werner added a comment -

          Hit this as well on 2.176.3.  Downgraded to 1.20 (the downgrade version offered on the Plugins page) and things work again.

          Show
          kddubb Kevin Werner added a comment - Hit this as well on 2.176.3.  Downgraded to 1.20 (the downgrade version offered on the Plugins page) and things work again.
          Hide
          gmc_devel GMC Software Development B&R Corporate added a comment - - edited

          It seems to be a kind of compatibility-missmatch between claim- and bfa-plugin.

          The claim plugin uses following code (see ClaimBuildFailureAnalyzer.java #44):

          public static boolean isBFAEnabled() {
              return (Jenkins.getInstance().getPlugin("build-failure-analyzer") != null
                  && Jenkins.getInstance().getPlugin(PluginImpl.class).isGlobalEnabled());
          }

          With release 1.23.0 of the Build Failure Analyzer the class PluginImpl does no longer extends the interface hudson.Plugin; it was changed to jenkins.model.GlobalConfiguration.
          I guess, that the core-method getPlugin returns null and therefore, another GlobalConfiguration-compatible implementation has to be used (for this newer bfa-release).

           

          Show
          gmc_devel GMC Software Development B&R Corporate added a comment - - edited It seems to be a kind of compatibility-missmatch between claim- and bfa-plugin. The claim plugin uses following code (see ClaimBuildFailureAnalyzer.java #44): public static boolean isBFAEnabled() {     return (Jenkins.getInstance().getPlugin("build-failure-analyzer") != null         && Jenkins.getInstance().getPlugin(PluginImpl.class).isGlobalEnabled()); } With release 1.23.0 of the Build Failure Analyzer the class PluginImpl does no longer extends the interface hudson.Plugin; it was changed to jenkins.model.GlobalConfiguration. I guess, that the core-method getPlugin returns null and therefore, another GlobalConfiguration-compatible implementation has to be used (for this newer bfa-release).  
          Hide
          nkjensen Niels Kristian Jensen added a comment - - edited

          I also have the issue in version Jenkins ver. 2.190.1 running on Windows server 2008R2

          Build Failure Analyzer 1.23.1 and Claim Plugin 2.15

          Show
          nkjensen Niels Kristian Jensen added a comment - - edited I also have the issue in version Jenkins ver. 2.190.1 running on Windows server 2008R2 Build Failure Analyzer 1.23.1 and Claim Plugin 2.15
          Hide
          nkjensen Niels Kristian Jensen added a comment -

          Tim Jacomb - the fix works fine. Should I set it to "Fixed but unreleased" or should the author (you) do that?

          Show
          nkjensen Niels Kristian Jensen added a comment - Tim Jacomb - the fix works fine. Should I set it to "Fixed but unreleased" or should the author (you) do that?
          Hide
          timja Tim Jacomb added a comment -

          It needs merging by the maintainers, I'm not a maintainer of either plugin

          Show
          timja Tim Jacomb added a comment - It needs merging by the maintainers, I'm not a maintainer of either plugin

            People

            Assignee:
            timja Tim Jacomb
            Reporter:
            npfistner Norbert Pfistner
            Votes:
            6 Vote for this issue
            Watchers:
            13 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: