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

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            dogfood 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
            Show
            dogfood 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: