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

CannotResolveClassException breaks loading of entire containing folder, not just one job

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      A user who had previously had the Build Flow plugin installed, and created some flows in a folder, then turned the plugin off. After a restart, the whole folder failed to load:

      com.thoughtworks.xstream.mapper.CannotResolveClassException: com.cloudbees.plugins.flow.BuildFlow
      	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:56)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:256)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
      	at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:49)
      	at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
      	at hudson.util.XStream2.unmarshal(XStream2.java:109)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:925)
      	at hudson.XmlFile.read(XmlFile.java:143)
      	at hudson.model.Items.load(Items.java:220)
      	at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:99)
      	at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:240)
      	at hudson.model.Items.load(Items.java:221)
      	at jenkins.model.Jenkins$18.run(Jenkins.java:2577)
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/XmlFile.java
          core/src/main/java/hudson/model/ItemGroupMixIn.java
          test/src/main/java/org/jvnet/hudson/test/MockFolder.java
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadCannotResolveClassException.zip
          http://jenkins-ci.org/commit/jenkins/a58e198f8aa60dd0cb244cba338d9c48141590e5
          Log:
          [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/XmlFile.java core/src/main/java/hudson/model/ItemGroupMixIn.java test/src/main/java/org/jvnet/hudson/test/MockFolder.java test/src/test/java/hudson/model/ItemGroupMixInTest.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadCannotResolveClassException.zip http://jenkins-ci.org/commit/jenkins/a58e198f8aa60dd0cb244cba338d9c48141590e5 Log: [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/tasks/junit/TestResultAction.java
          core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
          core/src/main/java/hudson/tasks/test/AggregatedTestResultAction.java
          core/src/main/java/hudson/tasks/test/MatrixTestResult.java
          test/src/test/java/hudson/tasks/test/TrivialTestResultAction.java
          http://jenkins-ci.org/commit/jenkins/2a2a7eb8ed29714961fd145a6186db4aef9d63ba
          Log:
          JENKINS-20951 JENKINS-18410 Did not make it into 1.544 due to validated merge holdups (mostly randomly failing tests, sigh).

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/tasks/junit/TestResultAction.java core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java core/src/main/java/hudson/tasks/test/AggregatedTestResultAction.java core/src/main/java/hudson/tasks/test/MatrixTestResult.java test/src/test/java/hudson/tasks/test/TrivialTestResultAction.java http://jenkins-ci.org/commit/jenkins/2a2a7eb8ed29714961fd145a6186db4aef9d63ba Log: JENKINS-20951 JENKINS-18410 Did not make it into 1.544 due to validated merge holdups (mostly randomly failing tests, sigh).
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #3111
          [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable. (Revision a58e198f8aa60dd0cb244cba338d9c48141590e5)
          JENKINS-20951 JENKINS-18410 Did not make it into 1.544 due to validated merge holdups (mostly randomly failing tests, sigh). (Revision 2a2a7eb8ed29714961fd145a6186db4aef9d63ba)

          Result = SUCCESS
          Jesse Glick : a58e198f8aa60dd0cb244cba338d9c48141590e5
          Files :

          • test/src/test/java/hudson/model/ItemGroupMixInTest.java
          • test/src/main/java/org/jvnet/hudson/test/MockFolder.java
          • test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadCannotResolveClassException.zip
          • core/src/main/java/hudson/model/ItemGroupMixIn.java
          • core/src/main/java/hudson/XmlFile.java
          • changelog.html

          Jesse Glick : 2a2a7eb8ed29714961fd145a6186db4aef9d63ba
          Files :

          • core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
          • core/src/main/java/hudson/tasks/test/AggregatedTestResultAction.java
          • test/src/test/java/hudson/tasks/test/TrivialTestResultAction.java
          • core/src/main/java/hudson/tasks/junit/TestResultAction.java
          • changelog.html
          • core/src/main/java/hudson/tasks/test/MatrixTestResult.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3111 [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable. (Revision a58e198f8aa60dd0cb244cba338d9c48141590e5) JENKINS-20951 JENKINS-18410 Did not make it into 1.544 due to validated merge holdups (mostly randomly failing tests, sigh). (Revision 2a2a7eb8ed29714961fd145a6186db4aef9d63ba) Result = SUCCESS Jesse Glick : a58e198f8aa60dd0cb244cba338d9c48141590e5 Files : test/src/test/java/hudson/model/ItemGroupMixInTest.java test/src/main/java/org/jvnet/hudson/test/MockFolder.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadCannotResolveClassException.zip core/src/main/java/hudson/model/ItemGroupMixIn.java core/src/main/java/hudson/XmlFile.java changelog.html Jesse Glick : 2a2a7eb8ed29714961fd145a6186db4aef9d63ba Files : core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java core/src/main/java/hudson/tasks/test/AggregatedTestResultAction.java test/src/test/java/hudson/tasks/test/TrivialTestResultAction.java core/src/main/java/hudson/tasks/junit/TestResultAction.java changelog.html core/src/main/java/hudson/tasks/test/MatrixTestResult.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/XmlFile.java
          core/src/main/java/hudson/model/ItemGroupMixIn.java
          test/src/main/java/org/jvnet/hudson/test/MockFolder.java
          test/src/test/java/hudson/model/ItemGroupMixInTest.java
          test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadCannotResolveClassException.zip
          http://jenkins-ci.org/commit/jenkins/fb0c7db9e80f70019cb127c4e58346f28a98c125
          Log:
          [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable.
          (cherry picked from commit a58e198f8aa60dd0cb244cba338d9c48141590e5)

          Conflicts:
          changelog.html
          core/src/main/java/hudson/XmlFile.java

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/XmlFile.java core/src/main/java/hudson/model/ItemGroupMixIn.java test/src/main/java/org/jvnet/hudson/test/MockFolder.java test/src/test/java/hudson/model/ItemGroupMixInTest.java test/src/test/resources/hudson/model/ItemGroupMixInTest/xmlFileReadCannotResolveClassException.zip http://jenkins-ci.org/commit/jenkins/fb0c7db9e80f70019cb127c4e58346f28a98c125 Log: [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable. (cherry picked from commit a58e198f8aa60dd0cb244cba338d9c48141590e5) Conflicts: changelog.html core/src/main/java/hudson/XmlFile.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/tasks/junit/TestResultAction.java
          core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
          core/src/main/java/hudson/tasks/test/AggregatedTestResultAction.java
          core/src/main/java/hudson/tasks/test/MatrixTestResult.java
          test/src/test/java/hudson/tasks/test/TrivialTestResultAction.java
          http://jenkins-ci.org/commit/jenkins/412befcb57d520bb1a5a737329785405c8f2c828
          Log:
          JENKINS-20951 JENKINS-18410 Did not make it into 1.544 due to validated merge holdups (mostly randomly failing tests, sigh).

          (cherry picked from commit 2a2a7eb8ed29714961fd145a6186db4aef9d63ba)

          Conflicts:
          changelog.html

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/tasks/junit/TestResultAction.java core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java core/src/main/java/hudson/tasks/test/AggregatedTestResultAction.java core/src/main/java/hudson/tasks/test/MatrixTestResult.java test/src/test/java/hudson/tasks/test/TrivialTestResultAction.java http://jenkins-ci.org/commit/jenkins/412befcb57d520bb1a5a737329785405c8f2c828 Log: JENKINS-20951 JENKINS-18410 Did not make it into 1.544 due to validated merge holdups (mostly randomly failing tests, sigh). (cherry picked from commit 2a2a7eb8ed29714961fd145a6186db4aef9d63ba) Conflicts: changelog.html
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/main/java/org/jvnet/hudson/test/MockFolder.java
          http://jenkins-ci.org/commit/jenkins-test-harness/ed58f6ce3cf3c9d8bac2f3a05ee63f860d2f1150
          Log:
          [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable.
          Originally-Committed-As: a58e198f8aa60dd0cb244cba338d9c48141590e5

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/MockFolder.java http://jenkins-ci.org/commit/jenkins-test-harness/ed58f6ce3cf3c9d8bac2f3a05ee63f860d2f1150 Log: [FIXED JENKINS-20951] XmlFile.read/unmarshal needs to catch general XStreamException so as to include CannotResolveClassException, thrown when a TopLevelItem provided by a plugin is unloadable. Originally-Committed-As: a58e198f8aa60dd0cb244cba338d9c48141590e5

            People

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

              Dates

              • Created:
                Updated:
                Resolved: