java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins

Jenkins JIRA | Oliver Gondža | 6 months ago
  1. 0

    {{Jenkins.instance}} in groovy console yields: {noformat} java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at Script1.class$(Script1.groovy) at Script1.$get$$class$jenkins$model$Jenkins(Script1.groovy) at Script1.run(Script1.groovy:1) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589) at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142) at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {noformat} Following happened earlier in slave log: {noformat} Slave.jar version: 2.52 This is a Unix slave Evacuated stdout Slave successfully connected and online Jul 27, 2016 8:36:57 AM jenkins.model.Jenkins <clinit> SEVERE: Failed to load Jenkins.class hudson.remoting.RemotingSystemException: java.lang.InterruptedException at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:266) at com.sun.proxy.$Proxy5.fetch3(Unknown Source) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:171) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at com.thoughtworks.xstream.XStream.buildMapper(XStream.java:590) at com.thoughtworks.xstream.XStream.<init>(XStream.java:568) at com.thoughtworks.xstream.XStream.<init>(XStream.java:496) at com.thoughtworks.xstream.XStream.<init>(XStream.java:465) at com.thoughtworks.xstream.XStream.<init>(XStream.java:411) at com.thoughtworks.xstream.XStream.<init>(XStream.java:350) at hudson.util.XStream2.<init>(XStream2.java:88) at jenkins.model.Jenkins.<clinit>(Jenkins.java:4217) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at Script1.class$(Script1.groovy) at Script1.$get$$class$jenkins$model$Jenkins(Script1.groovy) at Script1.run(Script1.groovy:1) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589) at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142) at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at hudson.remoting.Request.call(Request.java:147) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:253) ... 30 more {noformat} I dare to say it is another incarnation of JENKINS-19453, where classloading is interrupted and never reattempted.

    Jenkins JIRA | 6 months ago | Oliver Gondža
    java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins
  2. 0

    [JIRA] (JENKINS-36991) Unable to load class once the loading was interrupted

    Google Groups | 6 months ago | ogo...@gmail.com (JIRA)
    java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins<br>
  3. 0
    Upgrade play-plugins-redis to play-modules-redis. You may have to delete com.typesafe.plugin.RedisPlugin from play.plugins
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java jpos with epson tm-t20ii missing jp.core.epson.uposcommon.util.xml.XMLParserException

    Stack Overflow | 2 years ago | Cuong Truong
    java.lang.NoClassDefFoundError: jp/co/epson/uposcommon/util/XML/XMLParserException
  6. 0

    503 Error ObjectifyService NoClassDefFoundError

    Stack Overflow | 2 years ago | electrometro
    java.lang.NoClassDefFoundError: Could not initialize class Project.service.OfyService
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoClassDefFoundError

    Could not initialize class jenkins.model.Jenkins

    at java.lang.Class.forName0()
  2. Java RT
    Class.forName
    1. java.lang.Class.forName0(Native Method)
    2. java.lang.Class.forName(Class.java:191)
    2 frames
  3. Unknown
    Script1.run
    1. Script1.class$(Script1.groovy)
    2. Script1.$get$$class$jenkins$model$Jenkins(Script1.groovy)
    3. Script1.run(Script1.groovy:1)
    3 frames
  4. Groovy
    GroovyShell.evaluate
    1. groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
    2. groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
    3. groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
    3 frames
  5. Hudson
    RemotingDiagnostics$Script.call
    1. hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
    2. hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
    2 frames
  6. Hudson :: Remoting Layer
    InterceptingExecutorService$1.call
    1. hudson.remoting.UserRequest.perform(UserRequest.java:121)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:49)
    3. hudson.remoting.Request$2.run(Request.java:326)
    4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    4 frames
  7. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames