0

I am using jenkins for the build but every time i run a build it gives an error and fails?

These are the errors :

FATAL: hudson/tasks/Mailer$UserProperty java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Caused:
java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty
at
org.jenkinsci.plugins.p4.changes.P4ChangeRef.getChangeEntry(P4ChangeRef.java:18)
at org.jenkinsci.plugins.p4.tasks.CheckoutTask.getChangesFull(CheckoutTask.java:287)
at org.jenkinsci.plugins.p4.PerforceScm.calculateChanges(PerforceScm.java:535)
at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:496)
at hudson.scm.SCM.checkout(SCM.java:504)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1815)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Finished: FAILURE

Sinto
  • 3,915
  • 11
  • 36
  • 70

1 Answers1

0

Sounds like an out-of-date plugin/Jenkins install.

I would recommend updating Jenkins if you're on an older version (I'm currently running 2.121.2).

After Jenkins is updated, try updating all of your plugins as well.

From the main Jenkins page, click "Manage Jenkins" and then "Manage Plugins" or just navigate to: http://yourjenkins.install/pluginManager/.

Scroll to the bottom of the page, click the link "All" near the word Select. Then click the big blue Update button.

This will probably resolve the issue, if not, you've got a bigger issue.

VDALLCO
  • 168
  • 9
  • Thanks for the suggestion but i am also using jenkins 2.141. Then also i must upgrade it? – TheOnlyKiller Sep 21 '18 at 05:26
  • Which version you think might be compatible? – TheOnlyKiller Sep 21 '18 at 06:23
  • Your version of jenkins is newer than mine, so you don't have to worry about upgrading Jenkins itself. Skip to the part in my answer when I mention upgrading plugins. That's probably the part that will resolve your issue. – VDALLCO Sep 21 '18 at 15:18
  • There are no updates shown in manage plugins section issue is still unresolved! Any other method except the updation ? – TheOnlyKiller Sep 24 '18 at 11:13
  • Which plugins are you using on the build that's failing? Are you using any environment variables like this: $BUILD_NUMBER? – VDALLCO Sep 28 '18 at 13:02
  • Was this issue ever resolved? Facing the same thing with Jenkins 2.235.2 and P4 Plugin 1.10.14 which are both latest I believe – user2176152 Jul 22 '20 at 20:57
  • Hey sorry for so late reply but yeah plugin version was affecting this issue. In Jenkins you always need to take care about the plugin version as sometimes old version works and new ones do not. – TheOnlyKiller Jan 19 '22 at 12:53