Search code examples
jenkinsjenkins-pipelinejenkins-plugins

Problem with Jenkins startup after the deletion of ruby-runtime plugin


I.'m new to Jenkins, so can't fix my problem by myself. In Jenkins (v2.393) running in Docker. I've deleted a ruby-runtime plugin via UI. Now Jenkins show the error at startup:

java.lang.NoClassDefFoundError: org/jruby/javasupport/proxy/InternalJavaProxy
    at org.jenkinsci.jruby.JRubyMapper.serializedClass(JRubyMapper.java:20)
    at hudson.util.xstream.MapperDelegate.serializedClass(MapperDelegate.java:41)
    at com.thoughtworks.xstream.mapper.MapperWrapper.serializedClass(MapperWrapper.java:121)
    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1303)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1292)
    at com.thoughtworks.xstream.XStream.toXML(XStream.java:1265)
    at hudson.XmlFile.write(XmlFile.java:213)
    at jenkins.model.Jenkins.save(Jenkins.java:3566)
    at jenkins.model.Jenkins.<init>(Jenkins.java:1008)
    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:261)

I think that the ruby-runtime has dependencies that now cause failing. Could you please tell me how it can be fixed?


Solution

  • As I've found out from here:

    https://community.jenkins.io/t/jenkins-war-update-caused-issue-when-ruby-runtime-plugin-is-installed/3282

    the problem was that our Jenkins wasn't updated for a long time and some plugins were already deprecated. After the Jenkins image update the startup issue appeared. So, I've created a new jenkins_home folder and installed only active plugins. After that, I copied all the required information from the old jenkins_home folder. Of course, it's not the best possible solution, but now it's working.