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

Folder loading can be broken by a NPE in a build wrapper in one job

      A user of the Artifactory plugin encountered an error which caused an entire folder to not load:

      ... SEVERE jenkins.InitReactorRunner$1 onTaskFailed 
      Failed Loading job <foldername>
      java.lang.NullPointerException 
      	at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.getProjectActions(ArtifactoryGenericConfigurator.java:210) 
      	at hudson.model.Project.createTransientActions(Project.java:221) 
      	at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:739) 
      	at hudson.model.AbstractProject.onLoad(AbstractProject.java:334) 
      	at hudson.model.Project.onLoad(Project.java:90) 
      	at hudson.model.Items.load(Items.java:276) 
      	at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:105) 
      	at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:238) 
      	at hudson.model.Items.load(Items.java:276) 
      	at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:105) 
      	at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:238) 
      	at hudson.model.Items.load(Items.java:276) 
      	at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:105) 
      	at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:238) 
      	at hudson.model.Items.load(Items.java:276) 
      	at jenkins.model.Jenkins$18.run(Jenkins.java:2593) 
      	at ...
      

      The bug is in the Artifactory plugin, yet Jenkins core ought to have caught this and reported it without breaking loading of the job, much less the whole (top-level) folder.

          [JENKINS-22811] Folder loading can be broken by a NPE in a build wrapper in one job

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3920
          JENKINS-22811 Folder loading can break when an item inside the folder fails to load or throws an Exception. (Revision 3e29bd7eff12d73a9b49c1d6039dc6d0699db15a)
          [FIXED JENKINS-22811] Noting merge of #1517. (Revision 12251abe8fc46958a1ee931e9bd1ec6730f1efb0)

          Result = SUCCESS
          schristou88 : 3e29bd7eff12d73a9b49c1d6039dc6d0699db15a
          Files :

          • test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip
          • test/src/test/java/hudson/model/ItemGroupMixInTest.java
          • core/src/main/java/hudson/model/ItemGroupMixIn.java

          jesse glick : 12251abe8fc46958a1ee931e9bd1ec6730f1efb0
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3920 JENKINS-22811 Folder loading can break when an item inside the folder fails to load or throws an Exception. (Revision 3e29bd7eff12d73a9b49c1d6039dc6d0699db15a) [FIXED JENKINS-22811] Noting merge of #1517. (Revision 12251abe8fc46958a1ee931e9bd1ec6730f1efb0) Result = SUCCESS schristou88 : 3e29bd7eff12d73a9b49c1d6039dc6d0699db15a Files : test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip test/src/test/java/hudson/model/ItemGroupMixInTest.java core/src/main/java/hudson/model/ItemGroupMixIn.java jesse glick : 12251abe8fc46958a1ee931e9bd1ec6730f1efb0 Files : changelog.html

          Code changed in jenkins
          User: christ66
          Path:
          core/src/main/java/hudson/model/ItemGroupMixIn.java
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip
          http://jenkins-ci.org/commit/jenkins/3520042b1b4cdd11f07c4f4d5a80aeafa1a09377
          Log:
          JENKINS-22811 Folder loading can break when an item inside the folder fails to load or throws an Exception.

          (cherry picked from commit 3e29bd7eff12d73a9b49c1d6039dc6d0699db15a)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/model/ItemGroupMixIn.java test/src/test/java/hudson/model/ItemGroupMixInTest.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip http://jenkins-ci.org/commit/jenkins/3520042b1b4cdd11f07c4f4d5a80aeafa1a09377 Log: JENKINS-22811 Folder loading can break when an item inside the folder fails to load or throws an Exception. (cherry picked from commit 3e29bd7eff12d73a9b49c1d6039dc6d0699db15a)

          Code changed in jenkins
          User: christ66
          Path:
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          http://jenkins-ci.org/commit/jenkins/8b528efc49c2735fd3418b4fcb94832190339425
          Log:
          JENKINS-22811 Fixed compilation error

          (cherry picked from commit b5213b3815d3223f619113ebbccde4a8733df4c0)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: test/src/test/java/hudson/model/ItemGroupMixInTest.java http://jenkins-ci.org/commit/jenkins/8b528efc49c2735fd3418b4fcb94832190339425 Log: JENKINS-22811 Fixed compilation error (cherry picked from commit b5213b3815d3223f619113ebbccde4a8733df4c0)

          Code changed in jenkins
          User: christ66
          Path:
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          http://jenkins-ci.org/commit/jenkins/383223bc467d8e3b77dce0cdc4b542f154e1adc1
          Log:
          JENKINS-22811 Obtain folder from jenkins instead of using local variable.

          (cherry picked from commit 8f24c4aa5ccd944c4647e9f99077cad46cb24a2d)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: test/src/test/java/hudson/model/ItemGroupMixInTest.java http://jenkins-ci.org/commit/jenkins/383223bc467d8e3b77dce0cdc4b542f154e1adc1 Log: JENKINS-22811 Obtain folder from jenkins instead of using local variable. (cherry picked from commit 8f24c4aa5ccd944c4647e9f99077cad46cb24a2d)

          Code changed in jenkins
          User: christ66
          Path:
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          http://jenkins-ci.org/commit/jenkins/82adc7ff70438ef2484aecfa7d5f31a98b3d9783
          Log:
          JENKINS-22811 Mark test extension with the correct annotation

          (cherry picked from commit fa40c102f5dbd8b02470317d730a3778c9153b64)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: test/src/test/java/hudson/model/ItemGroupMixInTest.java http://jenkins-ci.org/commit/jenkins/82adc7ff70438ef2484aecfa7d5f31a98b3d9783 Log: JENKINS-22811 Mark test extension with the correct annotation (cherry picked from commit fa40c102f5dbd8b02470317d730a3778c9153b64)

          Code changed in jenkins
          User: christ66
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/Actionable.java
          core/src/main/java/hudson/model/Project.java
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip
          http://jenkins-ci.org/commit/jenkins/758cb5be1eee8d600734c97a15666002d7c1d39a
          Log:
          JENKINS-22811 If a project action fails to load we should log the project action and continue to load the project.

          (cherry picked from commit c3eb1cac794e2cf8efcb26695e8eb27ed80ece5c)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Actionable.java core/src/main/java/hudson/model/Project.java test/src/test/java/hudson/model/ItemGroupMixInTest.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip http://jenkins-ci.org/commit/jenkins/758cb5be1eee8d600734c97a15666002d7c1d39a Log: JENKINS-22811 If a project action fails to load we should log the project action and continue to load the project. (cherry picked from commit c3eb1cac794e2cf8efcb26695e8eb27ed80ece5c)

          Code changed in jenkins
          User: christ66
          Path:
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/Actionable.java
          http://jenkins-ci.org/commit/jenkins/ee309ef92096610259b0ec01e82940ba022bed1a
          Log:
          JENKINS-22811 Fix log message to report more verbose message.

          (cherry picked from commit da1c74f619feea134aa887b1e5b1774307ea0e47)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Actionable.java http://jenkins-ci.org/commit/jenkins/ee309ef92096610259b0ec01e82940ba022bed1a Log: JENKINS-22811 Fix log message to report more verbose message. (cherry picked from commit da1c74f619feea134aa887b1e5b1774307ea0e47)

          Code changed in jenkins
          User: christ66
          Path:
          core/src/main/java/hudson/model/ItemGroupMixIn.java
          http://jenkins-ci.org/commit/jenkins/937ed1b9ca6d43e8aed04ef8b3b1dd0a6c001256
          Log:
          JENKINS-22811 Remove redundant catch exception

          (cherry picked from commit d58c3cd5d6ac851f0a28b1c1bb6dbeb02fd2b1c9)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/model/ItemGroupMixIn.java http://jenkins-ci.org/commit/jenkins/937ed1b9ca6d43e8aed04ef8b3b1dd0a6c001256 Log: JENKINS-22811 Remove redundant catch exception (cherry picked from commit d58c3cd5d6ac851f0a28b1c1bb6dbeb02fd2b1c9)

          Code changed in jenkins
          User: christ66
          Path:
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          http://jenkins-ci.org/commit/jenkins/13774a105d6b750689afe67261f85c5fd949d371
          Log:
          JENKINS-22811 Remove unnecessary check in test unit. Fix misleading test unit comment.

          (cherry picked from commit 3661ed5093ee1f4dd508bbea8272de447fcc6996)

          Compare: https://github.com/jenkinsci/jenkins/compare/16ee133b4807...13774a105d6b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: test/src/test/java/hudson/model/ItemGroupMixInTest.java http://jenkins-ci.org/commit/jenkins/13774a105d6b750689afe67261f85c5fd949d371 Log: JENKINS-22811 Remove unnecessary check in test unit. Fix misleading test unit comment. (cherry picked from commit 3661ed5093ee1f4dd508bbea8272de447fcc6996) Compare: https://github.com/jenkinsci/jenkins/compare/16ee133b4807...13774a105d6b

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4292
          JENKINS-22811 Folder loading can break when an item inside the folder fails to load or throws an Exception. (Revision 3520042b1b4cdd11f07c4f4d5a80aeafa1a09377)
          JENKINS-22811 Fixed compilation error (Revision 8b528efc49c2735fd3418b4fcb94832190339425)
          JENKINS-22811 Obtain folder from jenkins instead of using local variable. (Revision 383223bc467d8e3b77dce0cdc4b542f154e1adc1)
          JENKINS-22811 Mark test extension with the correct annotation (Revision 82adc7ff70438ef2484aecfa7d5f31a98b3d9783)
          JENKINS-22811 If a project action fails to load we should log the project action and continue to load the project. (Revision 758cb5be1eee8d600734c97a15666002d7c1d39a)
          JENKINS-22811 Fix log message to report more verbose message. (Revision ee309ef92096610259b0ec01e82940ba022bed1a)
          JENKINS-22811 Remove redundant catch exception (Revision 937ed1b9ca6d43e8aed04ef8b3b1dd0a6c001256)
          JENKINS-22811 Remove unnecessary check in test unit. Fix misleading test unit comment. (Revision 13774a105d6b750689afe67261f85c5fd949d371)

          Result = UNSTABLE
          ogondza : 3520042b1b4cdd11f07c4f4d5a80aeafa1a09377
          Files :

          • core/src/main/java/hudson/model/ItemGroupMixIn.java
          • test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip
          • test/src/test/java/hudson/model/ItemGroupMixInTest.java

          ogondza : 8b528efc49c2735fd3418b4fcb94832190339425
          Files :

          • test/src/test/java/hudson/model/ItemGroupMixInTest.java

          ogondza : 383223bc467d8e3b77dce0cdc4b542f154e1adc1
          Files :

          • test/src/test/java/hudson/model/ItemGroupMixInTest.java

          ogondza : 82adc7ff70438ef2484aecfa7d5f31a98b3d9783
          Files :

          • test/src/test/java/hudson/model/ItemGroupMixInTest.java

          ogondza : 758cb5be1eee8d600734c97a15666002d7c1d39a
          Files :

          • core/src/main/java/hudson/model/Project.java
          • test/src/test/java/hudson/model/ItemGroupMixInTest.java
          • core/src/main/java/hudson/model/AbstractProject.java
          • core/src/main/java/hudson/model/Actionable.java
          • test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip

          ogondza : ee309ef92096610259b0ec01e82940ba022bed1a
          Files :

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

          ogondza : 937ed1b9ca6d43e8aed04ef8b3b1dd0a6c001256
          Files :

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

          ogondza : 13774a105d6b750689afe67261f85c5fd949d371
          Files :

          • test/src/test/java/hudson/model/ItemGroupMixInTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4292 JENKINS-22811 Folder loading can break when an item inside the folder fails to load or throws an Exception. (Revision 3520042b1b4cdd11f07c4f4d5a80aeafa1a09377) JENKINS-22811 Fixed compilation error (Revision 8b528efc49c2735fd3418b4fcb94832190339425) JENKINS-22811 Obtain folder from jenkins instead of using local variable. (Revision 383223bc467d8e3b77dce0cdc4b542f154e1adc1) JENKINS-22811 Mark test extension with the correct annotation (Revision 82adc7ff70438ef2484aecfa7d5f31a98b3d9783) JENKINS-22811 If a project action fails to load we should log the project action and continue to load the project. (Revision 758cb5be1eee8d600734c97a15666002d7c1d39a) JENKINS-22811 Fix log message to report more verbose message. (Revision ee309ef92096610259b0ec01e82940ba022bed1a) JENKINS-22811 Remove redundant catch exception (Revision 937ed1b9ca6d43e8aed04ef8b3b1dd0a6c001256) JENKINS-22811 Remove unnecessary check in test unit. Fix misleading test unit comment. (Revision 13774a105d6b750689afe67261f85c5fd949d371) Result = UNSTABLE ogondza : 3520042b1b4cdd11f07c4f4d5a80aeafa1a09377 Files : core/src/main/java/hudson/model/ItemGroupMixIn.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip test/src/test/java/hudson/model/ItemGroupMixInTest.java ogondza : 8b528efc49c2735fd3418b4fcb94832190339425 Files : test/src/test/java/hudson/model/ItemGroupMixInTest.java ogondza : 383223bc467d8e3b77dce0cdc4b542f154e1adc1 Files : test/src/test/java/hudson/model/ItemGroupMixInTest.java ogondza : 82adc7ff70438ef2484aecfa7d5f31a98b3d9783 Files : test/src/test/java/hudson/model/ItemGroupMixInTest.java ogondza : 758cb5be1eee8d600734c97a15666002d7c1d39a Files : core/src/main/java/hudson/model/Project.java test/src/test/java/hudson/model/ItemGroupMixInTest.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Actionable.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadExceptionOnLoad.zip ogondza : ee309ef92096610259b0ec01e82940ba022bed1a Files : core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Actionable.java ogondza : 937ed1b9ca6d43e8aed04ef8b3b1dd0a6c001256 Files : core/src/main/java/hudson/model/ItemGroupMixIn.java ogondza : 13774a105d6b750689afe67261f85c5fd949d371 Files : test/src/test/java/hudson/model/ItemGroupMixInTest.java

            schristou Steven Christou
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: