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

NullPointer exception in Artifactory Plugin when using publishers from other project

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • Jenkins version 2.46.1 LTS
      Artifactory Plugin 2.10.3 (working with 2.9.x)

      Our jobs are mostly all configured to use a common "template" project that has a stock set of publishers defined, including publishing artifacts to artifactory via the plugin.

       

      When we upgraded to the lasted version of Artifactory all our builds started failing with a NullPointer exception in the plugin:

      ERROR: Build step failed with exception
      java.lang.NullPointerException
      at org.jfrog.hudson.ArtifactoryServer.setRetryParams(ArtifactoryServer.java:268)
      at org.jfrog.hudson.ArtifactoryServer.createArtifactoryClient(ArtifactoryServer.java:251)
      at org.jfrog.hudson.ArtifactoryRedeployPublisher.perform(ArtifactoryRedeployPublisher.java:432)
      at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:85)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1067)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      at hudson.model.Run.execute(Run.java:1753)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)

       

      I'm going to hazard a guess it is related to the fix for: https://www.jfrog.com/jira/browse/HAP-855

       

          [JENKINS-43514] NullPointer exception in Artifactory Plugin when using publishers from other project

          arvoreen, Thanks for reporting this issue.

          We have committed a fix for this issue and it will be included in our next release. 

          In the mean time you are welcome to try snapshot version with the fix.

          Also as a workaround to avoid this issue on the current version go to Manage Jenkins -> Configure Jenkins and press the save/apply button.

           

          Roman Gurevitch added a comment - arvoreen , Thanks for reporting this issue. We have committed a fix for this issue and it will be included in our next release.  In the mean time you are welcome to try snapshot version with the fix. Also as a workaround to avoid this issue on the current version go to Manage Jenkins ->   Configure Jenkins and press the save/apply button.  

          Skylar Sutton added a comment -

          Confirming we hit this issue with Jenkins 2.55 (Windows) + Artifactory Plugin 2.10.3. The workaround in the comments above (re-save the settings via Manage Jenkins --> Configure System --> Save) resolved the issue.

          Skylar Sutton added a comment - Confirming we hit this issue with Jenkins 2.55 (Windows) + Artifactory Plugin 2.10.3. The workaround in the comments above (re-save the settings via Manage Jenkins --> Configure System --> Save) resolved the issue.

          Skylar,

          Does the snapshot version Roman published here (see his comment above) resolves the issue?

          Eyal Ben Moshe added a comment - Skylar, Does the snapshot version Roman published here (see his comment above) resolves the issue?

          Skylar Sutton added a comment -

          Sorry - unable to confirm, we attempted the work around first. My comment was meant more to provide validation that the bug exists / still exits with the v2.5.x stream of Jenkins. 

          Skylar Sutton added a comment - Sorry - unable to confirm, we attempted the work around first. My comment was meant more to provide validation that the bug exists / still exits with the v2.5.x stream of Jenkins. 

          I saw following issue:

           
          11:08:48 Jenkins Artifactory Plugin version: 2.15.0*11:08:48* ERROR: null*11:08:48* java.lang.NullPointerException*11:08:48* at org.jfrog.hudson.util.SpecUtils.getSpecStringFromSpecConf(SpecUtils.java:20)11:08:48 at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.setUp(ArtifactoryGenericConfigurator.java:352)11:08:48 at hudson.model.Build$BuildExecution.doRun(Build.java:157)11:08:48 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)11:08:48 at hudson.model.Run.execute(Run.java:1798)11:08:48 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)11:08:48 at hudson.model.ResourceController.execute(ResourceController.java:97)11:08:48 at hudson.model.Executor.run(Executor.java:429)11:08:48 Finished: FAILURE

          Petr Prochazka added a comment - I saw following issue:   11:08:48 Jenkins Artifactory Plugin version: 2.15.0*11:08:48* ERROR: null*11:08:48* java.lang.NullPointerException*11:08:48* at org.jfrog.hudson.util.SpecUtils.getSpecStringFromSpecConf(SpecUtils.java:20) 11:08:48 at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.setUp(ArtifactoryGenericConfigurator.java:352) 11:08:48 at hudson.model.Build$BuildExecution.doRun(Build.java:157) 11:08:48 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) 11:08:48 at hudson.model.Run.execute(Run.java:1798) 11:08:48 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 11:08:48 at hudson.model.ResourceController.execute(ResourceController.java:97) 11:08:48 at hudson.model.Executor.run(Executor.java:429) 11:08:48 Finished: FAILURE

          Petr Prochazka added a comment - - edited

          It has been fixed for me by workaround Job -> Configure -> Save -> than Download and upload by "Legacy patterns (deprecated)"

          Petr Prochazka added a comment - - edited It has been fixed for me by workaround Job -> Configure -> Save -> than Download and upload by "Legacy patterns (deprecated)"

            eyalbe Eyal Ben Moshe
            arvoreen Eduard Martinescu
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: