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

Promoted builds throw NullPointerException after upgrade to 1.507

      After upgrade Jenkins to 1.507 I dont see any job, found this in log

      SEVERE: Failed Loading job <jobName>
      java.lang.NullPointerException
      	at hudson.plugins.promoted_builds.JobPropertyImpl.getItem(JobPropertyImpl.java:220)
      	at hudson.plugins.promoted_builds.JobPropertyImpl.getItem(JobPropertyImpl.java:41)
      	at hudson.model.AbstractProject.onLoad(AbstractProject.java:291)
      	at hudson.model.Items.load(Items.java:221)
      	at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:99)
      	at hudson.plugins.promoted_builds.JobPropertyImpl.setOwner(JobPropertyImpl.java:145)
      	at hudson.plugins.promoted_builds.JobPropertyImpl.setOwner(JobPropertyImpl.java:41)
      	at hudson.model.Job.onLoad(Job.java:201)
      	at hudson.model.AbstractProject.onLoad(AbstractProject.java:282)
      	at hudson.model.Project.onLoad(Project.java:83)
      	at hudson.model.Items.load(Items.java:221)
      	at jenkins.model.Jenkins$17.run(Jenkins.java:2552)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:887)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:679)
      

      When I disable promoted builds plugin, jobs appear again, but w/o promotions, of course.

          [JENKINS-17341] Promoted builds throw NullPointerException after upgrade to 1.507

          Hannes Kogler added a comment - - edited

          We have the same problem when we made an upgrade from Jenkins ver. 1.492 to Jenkins ver. 1.508.

          I found out that if you delete the promotions folder at a special job on disk this job will be loaded to jenkins view again when restarting.
          hoping for a quick fix... :-/

          Hannes Kogler added a comment - - edited We have the same problem when we made an upgrade from Jenkins ver. 1.492 to Jenkins ver. 1.508. I found out that if you delete the promotions folder at a special job on disk this job will be loaded to jenkins view again when restarting. hoping for a quick fix... :-/

          Same problem. Though I'm fine with reverting to an older version I was quite frustrated to learn the Jenkins debian repo no longer carries older versions so they can't be installed via apt-get install jenkins=1.506 or in my case by puppet.
          I had to download 1.506 manually, add it to my own debian repo and install it from there.

          I think it would be nice to have a few older versions available for immediate installation via apt-get.

          Sebastian Gozin added a comment - Same problem. Though I'm fine with reverting to an older version I was quite frustrated to learn the Jenkins debian repo no longer carries older versions so they can't be installed via apt-get install jenkins=1.506 or in my case by puppet. I had to download 1.506 manually, add it to my own debian repo and install it from there. I think it would be nice to have a few older versions available for immediate installation via apt-get.

          Jesse Glick added a comment -

          Should be fixed in 2.10.

          Jesse Glick added a comment - Should be fixed in 2.10.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java
          src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml
          http://jenkins-ci.org/commit/promoted-builds-plugin/145a38922ef87bb0bea5edb372d7e11e07bdb6eb
          Log:
          [FIXED JENKINS-17341] NPE after JENKINS-3265 fix.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml http://jenkins-ci.org/commit/promoted-builds-plugin/145a38922ef87bb0bea5edb372d7e11e07bdb6eb Log: [FIXED JENKINS-17341] NPE after JENKINS-3265 fix.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java
          src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml
          src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml
          http://jenkins-ci.org/commit/promoted-builds-plugin/8147deb58e583ba696cd7feb451b1afabcb15a3d
          Log:
          Merge pull request #24 from jglick/NPE-JENKINS-17341

          [FIXED JENKINS-17341] NPE after JENKINS-3265 fix.

          Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/8f07c80a678d...8147deb58e58

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java src/test/java/hudson/plugins/promoted_builds/ConfigurationRoundtripTest.java src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/config.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/builds/2012-10-08_10-29-01/build.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/config.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/builds/2012-10-08_10-30-11/build.xml src/test/resources/hudson/plugins/promoted_builds/ConfigurationRoundtripTest/testLoad/jobs/j/promotions/OK/config.xml http://jenkins-ci.org/commit/promoted-builds-plugin/8147deb58e583ba696cd7feb451b1afabcb15a3d Log: Merge pull request #24 from jglick/NPE- JENKINS-17341 [FIXED JENKINS-17341] NPE after JENKINS-3265 fix. Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/8f07c80a678d...8147deb58e58

          wgracelee added a comment -

          When we upgraded Jenkins to 1.510, we saw the problem.
          But once we upgraded the promoted builds plugin to 2.10 (from 2.6.2), the problem went away.

          wgracelee added a comment - When we upgraded Jenkins to 1.510, we saw the problem. But once we upgraded the promoted builds plugin to 2.10 (from 2.6.2), the problem went away.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2710
          JENKINS-3265 JENKINS-17341 Even if older plugins throw an NPE during reload, continue loading job. (Revision ef08900292726bb35be269ce6d41d8dc141c6dea)

          Result = SUCCESS
          Jesse Glick : ef08900292726bb35be269ce6d41d8dc141c6dea
          Files :

          • core/src/main/java/hudson/model/AbstractProject.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2710 JENKINS-3265 JENKINS-17341 Even if older plugins throw an NPE during reload, continue loading job. (Revision ef08900292726bb35be269ce6d41d8dc141c6dea) Result = SUCCESS Jesse Glick : ef08900292726bb35be269ce6d41d8dc141c6dea Files : core/src/main/java/hudson/model/AbstractProject.java

          I have applied the patch for fixing [17341][3265] on the LTS and worked.
          The issue was solved and I labeled it as LTS candidate.

          It would be nice to have it on the next LTS version.

          Diego Peleteiro added a comment - I have applied the patch for fixing [17341] [3265] on the LTS and worked. The issue was solved and I labeled it as LTS candidate. It would be nice to have it on the next LTS version.

          What's the reason why Jesse's patch has been rejected for LTS?

          Any chance we can port https://github.com/jenkinsci/jenkins/commit/ef08900292726bb35be269ce6d41d8dc141c6dea to LTS as well?

          Christian Trabold added a comment - What's the reason why Jesse's patch has been rejected for LTS? Any chance we can port https://github.com/jenkinsci/jenkins/commit/ef08900292726bb35be269ce6d41d8dc141c6dea to LTS as well?

          Jesse Glick added a comment -

          @diegopeleteiro, @ctrabold the fix was in 1.524, so will be in the next LTS: 1.532.1.

          Jesse Glick added a comment - @diegopeleteiro, @ctrabold the fix was in 1.524, so will be in the next LTS: 1.532.1.

            jglick Jesse Glick
            mcheshkov Mikhail Cheshkov
            Votes:
            14 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated:
              Resolved: