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

com.thoughtworks.xstream.mapper.CannotResolveClassException: com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • role-strategy-plugin
    • None

      After upgrading Jenkins LTS and plugins to available updates, Jenkins was working fine.

      I have been meaning to address the plugin warnings under Manage Jenkins, so I tried upgrading them one by one starting with ones with the least amount of dependencies.

      The ones listed under Plugin Updates did not have dependencies with role strategy, however after upgrading the first one (not sure if it's the first from the above screenshot), Jenkins is no longer starting.

       

      Here is the full strack trace:

      rrorcom.thoughtworks.xstream.mapper.CannotResolveClassException: com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy
      	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:81)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:452)
      	at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:46)
      	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125)
      	at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
      	at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:521)
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:346)
      Caused: jenkins.util.xstream.CriticalXStreamException: 
      ---- Debugging information ----
      cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
      cause-message       : com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy
      class               : hudson.model.Hudson
      required-type       : hudson.model.Hudson
      converter-type      : hudson.util.RobustReflectionConverter
      path                : /hudson/authorizationStrategy
      line number         : 11
      version             : 2.440.3
      -------------------------------
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:381)
      	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:289)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
      	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:136)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1464)
      	at hudson.util.XStream2.unmarshal(XStream2.java:230)
      	at hudson.util.XStream2.unmarshal(XStream2.java:201)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1441)
      	at hudson.XmlFile.unmarshal(XmlFile.java:196)
      Caused: java.io.IOException: Unable to read /opt/jenkins/jenkins/config.xml
      	at hudson.XmlFile.unmarshal(XmlFile.java:199)
      	at hudson.XmlFile.unmarshal(XmlFile.java:179)
      	at jenkins.model.Jenkins.load(Jenkins.java:3380)
      	at jenkins.model.Jenkins$12.run(Jenkins.java:3492)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:177)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
      	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1170)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused: org.jvnet.hudson.reactor.ReactorException
      	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:290)
      	at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
      	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1205)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:992)
      	at hudson.model.Hudson.<init>(Hudson.java:86)
      	at hudson.model.Hudson.<init>(Hudson.java:82)
      	at hudson.WebAppMain$3.run(WebAppMain.java:248)
      Caused: hudson.util.HudsonFailedToLoad
      	at hudson.WebAppMain$3.run(WebAppMain.java:276)
       

      I've tried restoring backups prior to these upgrades, and the same error is still persisting.

       

      Are there any system files outside of the jenkins folder that impact the role strategy plugin?  

       

      It was not any of the dependencies of the role strategy plugin that I had upgraded https://plugins.jenkins.io/role-strategy/dependencies/ but perhaps a plugin that is dependent on role-strategy.  I checked other related tickets for this error and could not find a solution.

            oleg_nenashev Oleg Nenashev
            lkisac01 lkis01
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: