Onto my next post LTS upgrade problem. Suddenly we see this stacktrace in build logs when the git plugin is fetching from the repository.
Caused by: java.lang.NoClassDefFoundError:
org.jenkinsci.plugins.gitclient.GitClient
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
at java.lang.Class.getDeclaredField(Class.java:1946)
at
java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1659)
at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:72)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:480)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:468)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:602)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1622)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:211)
at hudson.remoting.Channel.call(Channel.java:723)
A similar stacktrace if we try to run the build on the master instead.
We got this problem at one time when we first upgraded (everything), my first
guess was that it was because of some library changes in git-client so we
cleaned up some old hpi and jpi files and installed the previous micro version
of git and git client, started Jenkins and it worked again.
The other servers didn't have the problem when we upgraded them. But suddenly
yesterday it happened in runtime. On Monday the git plugin worked and on
Tuesday it didn't.
I've tried some Groovy debugging with the following script:
def gitClient = Jenkins.instance.pluginManager.getPlugin("git-client")
println(gitClient.classLoader.findLoadedClass("org.jenkinsci.plugins.gitclient.GitClient"))
//output: interface org.jenkinsci.plugins.gitclient.GitClient
println(Jenkins.instance.pluginManager.uberClassLoader.findClass("org.jenkinsci.plugins.gitclient.GitClient"))
//output: interface org.jenkinsci.plugins.gitclient.GitClient
def gitPlugin = Jenkins.instance.pluginManager.getPlugin("git")
println(gitPlugin.classLoader.findLoadedClass("hudson.plugins.git.GitSCM"))
//output: class hudson.plugins.git.GitSCM
println(Jenkins.instance.pluginManager.uberClassLoader.findClass("hudson.plugins.git.GitSCM"))
//output: class hudson.plugins.git.GitSCM
println(gitPlugin.classLoader.findLoadedClass("org.jenkinsci.plugins.gitclient.GitClient"))
//output: interface org.jenkinsci.plugins.gitclient.GitClient
def job = Jenkins.instance.getItem("Tools_GerritTester")
println(job.getClass().getClassLoader().findLoadedClass("org.jenkinsci.plugins.gitclient.GitClient"))
//output: null
println(job.getClass().getClassLoader().findLoadedClass("hudson.plugins.git.GitSCM"))
//output: null
println(job.getScm().getClass().getClassLoader().findLoadedClass("org.jenkinsci.plugins.gitclient.GitClient"))
//output: interface org.jenkinsci.plugins.gitclient.GitClient
The output is the same whether I run it on a master with the problem or one
that doesn't have it.
Are there any other classloading scenarios that I've missed, or something else
I can try to find the issue? I'd prefer to not just reboot and forget about it
;)
Robert Sandell
Staff Engineer
Development Environment
Software Environment and Product Configuration
Sony Mobile Communications
Tel: +46 10 80 12721
[email protected]<mailto:[email protected]>
sonymobile.com<http://sonymobile.com/>
[cid:[email protected]]
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
<<inline: image003.png>>
