Details

    • Similar Issues:

      Description

      A user of 1.509.3 with the Metadata plugin formerly installed had some data listed in Discard Old Data screen, as expected:

      hudson.model.FreeStyleBuild
      jobname #123
      CannotResolveClassException: com.sonyericsson.hudson.plugins.metadata.model.MetadataBuildAction

      He clicked Discard and received an error:

      java.lang.NullPointerException
      	at hudson.model.AbstractItem.getRootDir(AbstractItem.java:162)
      	at hudson.model.Items.getConfigFile(Items.java:236)
      	at hudson.model.AbstractItem.getConfigFile(AbstractItem.java:461)
      	at hudson.model.AbstractItem.save(AbstractItem.java:456)
      	at hudson.model.Job.save(Job.java:152)
      	at hudson.model.AbstractProject.save(AbstractProject.java:268)
      	at hudson.diagnosis.OldDataMonitor.doDiscard(OldDataMonitor.java:275)
      

      This means that there is an AbstractProject whose parent is null. Most likely a serialized MetadataBuildAction was persisting a Run which was not identical to the build to which it had been added (this is possible due to lazy-loading), so XStream did not use a backreference but instead tried to serialize the whole build. When deserialized, the orphaned build would have had a bogus parent project.

      The solution in 1.519+ (or 1.509.3/4) is simple: use the new RunAction2. There is no alternative available for older versions of Jenkins.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-17125 [ JENKINS-17125 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-18809 [ JENKINS-18809 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-19544 [ JENKINS-19544 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 152761 ] JNJira + In-Review [ 194345 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-45892 [ JENKINS-45892 ]

              People

              • Assignee:
                rsandell rsandell
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: