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

Upgrading from 2.346.2 to 2.375.1 breaks jenkins

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core, saml-plugin
    • Upgraded from 2.346.2 to 2.375.1

       

      Hi

      When I upgraded jenkins to 2.375.1 from 2.346.2. I get the error below on the GUI and I am not able to login. I installed Java 11 as well.

       

      com.thoughtworks.xstream.mapper.CannotResolveClassException: org.jenkinsci.plugins.saml.SamlSecurityRealm
      	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:413)
      	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:523)
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:348)
      Caused: jenkins.util.xstream.CriticalXStreamException: 
      ---- Debugging information ----
      cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
      cause-message       : org.jenkinsci.plugins.saml.SamlSecurityRealm
      class               : hudson.model.Hudson
      required-type       : hudson.model.Hudson
      converter-type      : hudson.util.RobustReflectionConverter
      path                : /hudson/securityRealm
      line number         : 16
      version             : not available
      -------------------------------
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:383)
      	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:291)
      	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:1421)
      	at hudson.util.XStream2.unmarshal(XStream2.java:190)
      	at hudson.util.XStream2.unmarshal(XStream2.java:161)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1399)
      	at hudson.XmlFile.unmarshal(XmlFile.java:196)
      Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
      	at hudson.XmlFile.unmarshal(XmlFile.java:199)
      	at hudson.XmlFile.unmarshal(XmlFile.java:179)
      	at jenkins.model.Jenkins.loadConfig(Jenkins.java:3299)
      	at jenkins.model.Jenkins$12.run(Jenkins.java:3401)
      	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:1161)
      	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:70)
      	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:1196)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:986)
      	at hudson.model.Hudson.<init>(Hudson.java:86)
      	at hudson.model.Hudson.<init>(Hudson.java:82)
      	at hudson.WebAppMain$3.run(WebAppMain.java:247)
      Caused: hudson.util.HudsonFailedToLoad
      	at hudson.WebAppMain$3.run(WebAppMain.java:264) 

       

       [root@gwu-jenkins-master-stage-10-82-130-114 ~]# update-alternatives --config javaThere are 2 programs which provide 'java'.  Selection    Command
      -----------------------------------------------
      *  1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.amzn2.0.1.x86_64/jre/bin/java)
       + 2           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.amzn2.0.1.x86_64/bin/java)

       

          [JENKINS-70440] Upgrading from 2.346.2 to 2.375.1 breaks jenkins

          com.thoughtworks.xstream.mapper.CannotResolveClassException: org.jenkinsci.plugins.saml.SamlSecurityRealm

          the error is pretty clear, the class is not found, so the plugin has failed to load for some reason. You have to check the Jenkins start logs, should be an error message telling you why the SAML plugin is not loaded, it would probably be a dependencies issue.

          Ivan Fernandez Calvo added a comment - com.thoughtworks.xstream.mapper.CannotResolveClassException: org.jenkinsci.plugins.saml.SamlSecurityRealm the error is pretty clear, the class is not found, so the plugin has failed to load for some reason. You have to check the Jenkins start logs, should be an error message telling you why the SAML plugin is not loaded, it would probably be a dependencies issue.

          Mark Waite added a comment -

          Please read and follow the instructions in the upgrade guides (2.375 and 2.364). Among other things, they tell you that you must upgrade all plugins before performing the upgrade, then must again upgrade all plugins after performing the upgrade.

          Mark Waite added a comment - Please read and follow the instructions in the upgrade guides ( 2.375 and 2.364 ). Among other things, they tell you that you must upgrade all plugins before performing the upgrade, then must again upgrade all plugins after performing the upgrade.

            ifernandezcalvo Ivan Fernandez Calvo
            rajivravio Rajiv
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: