NoClassDefFoundError: tasks/SimpleBuildStep

245 views
Skip to first unread message

Andrew Langhorn

unread,
Apr 7, 2015, 6:56:35 AM4/7/15
to jenkins...@googlegroups.com
Hi,

We run Jenkins 1.532.1 in some environments, and have recently come across an issue with SimpleBuildStep not being found as a valid class. This generates a lovely stack trace (as below) and linked jobs then fail.

FATAL: jenkins/tasks/SimpleBuildStep
java.lang.NoClassDefFoundError: jenkins/tasks/SimpleBuildStep
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:695)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at jenkins.ClassLoaderReflectionToolkit.invoke(ClassLoaderReflectionToolkit.java:44)
at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:86)
at hudson.ClassicPluginStrategy$DependencyClassLoader.findClass(ClassicPluginStrategy.java:572)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at jenkins.util.AntClassLoader.findBaseClass(AntClassLoader.java:1397)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1074)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at hudson.plugins.git.GitChangeSet.hasHudsonTasksMailer(GitChangeSet.java:293)
at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:271)
at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:326)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:414)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:729)
at hudson.model.Run.execute(Run.java:1709)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
Caused by: java.lang.ClassNotFoundException: jenkins.tasks.SimpleBuildStep
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

I thought an unattended-upgrade of the JVM might have caused this, but I can't see anything in the logs that would suggest that Java has been upgraded recently. This used to work absolutely fine, and now it doesn't - hence we're hesitant to upgrade right now to resolve this issue.

Does anyone have any ideas? :)

Let me know if you need any further details.

Thanks,

Andrew

Daniel Beck

unread,
Apr 7, 2015, 3:23:47 PM4/7/15
to jenkins...@googlegroups.com
You're likely using a plugin that requires a newer version of Jenkins than 1.532.x (specifically 1.577 or newer). Possibly because you manage those using Chef or a similar tool and completely ignore the plugins' dependencies.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/54c4056d-5586-4a06-bcaa-1c52001b46fe%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Andrew Langhorn

unread,
Apr 7, 2015, 3:58:40 PM4/7/15
to jenkins...@googlegroups.com
We are using Puppet to manage plugins, but the dependencies should be all met - I've checked them against a machine that was provisioned without Puppet, and the versions match.

I'll have another trawl through at some point soon, then...

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/a5DmElNBZpM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9D18348F-9403-43AE-B2FA-8243EC5176DA%40beckweb.net.

For more options, visit https://groups.google.com/d/optout.



--
Andrew Langhorn
Web Operations
Government Digital Service

a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH

Daniel Beck

unread,
Apr 7, 2015, 4:53:28 PM4/7/15
to jenkins...@googlegroups.com
Specifically the Mailer plugin is version 1.12+ when it must not be newer than 1.11.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANCa_WarHU0fnbUv0fRim2vrktmzFmDhZscRL0ypEVBKro1s1w%40mail.gmail.com.

Andrew Langhorn

unread,
Apr 8, 2015, 5:11:41 AM4/8/15
to jenkins...@googlegroups.com
We run Mailer 1.15, and haven't had issues with it for quite a while.
I could manually downgrade it to 1.11, but I don't see why 1.15 just stopped working all of a suddent?


For more options, visit https://groups.google.com/d/optout.

Andrew Langhorn

unread,
Apr 8, 2015, 12:09:41 PM4/8/15
to jenkins...@googlegroups.com
I'm trying to manually downgrade Mailer to 1.11 from 1.15, but every time I do, it seems hell-bent on re-appearing as 1.15. Since there's no nice uninstall button for it in Jenkins, I'm removing the JPI and related folder from $JENKINS_HOME/plugins then restarting the Jenkins service per the Jenkins documentation.

I have Puppet disabled on the machine I'm using for testing, even though Puppet will only run when I put the VM in to reprovision since I'm using Vagrant. I'm confident that Puppet's not running since there's nothing in syslog to suggest it is.

Does Jenkins put Mailer back there on boot if it doesn't exist? If that's the case, how do I downgrade it?!
Reply all
Reply to author
Forward
0 new messages