• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core, git-plugin
    • None
    • OS: Debian 7

      I have several free style projects, some of then run on a scheduled basis and some of them using a post commit hook from Github.
      After upgrading to version 1.528 and updating the installed plugins, the automatic some manual builds and all automatic builds started failing, apart from that, another exception it's raised when trying to open the changelog for a build. Here are the exceptions:

      1) On the builds that fail here is the exception log:
      tarted by user Federico Saravia
      Building in workspace /var/lib/jenkins/jobs/test-api/workspace
      Checkout:workspace / /var/lib/jenkins/jobs/test-api/workspace - hudson.remoting.LocalChannel@6281d31b
      Using strategy: Default
      Last Built Revision: Revision e87ed66aeab0ed5b9da96c574c3c326e4a70e332 (origin/development)
      Fetching changes from 1 remote Git repository
      Fetching upstream changes from origin
      Commencing build of Revision 81206b9ccedc3eeaa1890dc4e960359ad989202d (origin/development)
      Checking out Revision 81206b9ccedc3eeaa1890dc4e960359ad989202d (origin/development)
      FATAL: hudson/tasks/Mailer$UserProperty
      java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty
      at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:70)
      at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:59)
      at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:23)
      at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:922)
      at hudson.model.AbstractBuild.access$600(AbstractBuild.java:105)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:681)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
      at hudson.model.Run.execute(Run.java:1603)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:247)
      Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty
      at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
      at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      ... 12 more

      On the changelog screen the raised Exception is different (only if there has been changes in the build), the exception is attached.

      Another thing, maybe related to the issue is that jenkins tells me that I have old or unreadable data:
      hudson.model.FreeStyleProject api NoClassDefFoundError: hudson/tasks/Mailer$UserProperty

      I can delete that data, but every time one of the builds fail it comes back.
      I may point that I never installed or used the Mailer plugin. The only plugins I installed and use are the Git plugin and the SSH plugin, so I don't know where this Mailer$UserProperty came from.

      I already tried downgrading the plugins to their bundled version but that didn's solve the problem

          [JENKINS-19345] NoClassDefFoundError on project build

          Jay Scott added a comment - - edited

          Have ran into the same issue however I am running Jenkins 1.529. Same situation, some manual builds will work however all polled builds fail every time. I do not have the mailer plugin installed and its not within the plugin directory on disk.

          OS: Redhat 6.4
          Jenkins: 1.529
          Git Plugin: 1.5.0
          Git Client Plugin: 1.1.2

          Please let me know if you need more information.

          Fetching upstream changes from origin
          Commencing build of Revision bac119abc399796146043fa057efe3e485a65256 (origin/dev)
          Checking out Revision bac119abc399796146043fa057efe3e485a65256 (origin/dev)
          FATAL: hudson/tasks/Mailer$UserProperty
          java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty
          at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:70)
          at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:49)
          at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:23)
          at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:922)
          at hudson.model.AbstractBuild.access$600(AbstractBuild.java:105)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:681)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
          at hudson.model.Run.execute(Run.java:1603)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:247)
          Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty
          at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
          at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
          at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
          ... 12 more

          FATAL: hudson/tasks/Mailer$UserProperty
          java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty
          at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:70)
          at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:59)
          at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:23)
          at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:922)
          at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:896)
          at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:420)
          at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:417)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
          at hudson.model.Run.execute(Run.java:1628)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:247)
          Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty
          at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
          at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
          at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

          Jay Scott added a comment - - edited Have ran into the same issue however I am running Jenkins 1.529. Same situation, some manual builds will work however all polled builds fail every time. I do not have the mailer plugin installed and its not within the plugin directory on disk. OS: Redhat 6.4 Jenkins: 1.529 Git Plugin: 1.5.0 Git Client Plugin: 1.1.2 Please let me know if you need more information. Fetching upstream changes from origin Commencing build of Revision bac119abc399796146043fa057efe3e485a65256 (origin/dev) Checking out Revision bac119abc399796146043fa057efe3e485a65256 (origin/dev) FATAL: hudson/tasks/Mailer$UserProperty java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:70) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:49) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:23) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:922) at hudson.model.AbstractBuild.access$600(AbstractBuild.java:105) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:681) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581) at hudson.model.Run.execute(Run.java:1603) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 12 more FATAL: hudson/tasks/Mailer$UserProperty java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:70) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:59) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:23) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:922) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:896) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:420) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:417) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733) at hudson.model.Run.execute(Run.java:1628) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

          I seem to have found the cause of the problem.
          In my case, I use the Git plugin to receive post commit hooks, those commits have the email of the user that made the changes.
          The problem is that the plugin parses the changelog and uses a tries to instantiate the class Mailer$UserProperty which is part of the Mailer plugin.
          Previous versions of Jenkins had the Mailer plugin bundled into Jenkins core, now that Mailer is a separate plugin, and Git plugin doesn't specify it as a dependency, it fails.
          A quick solution is to install or activate the Mailer plugin, I did that and now all the builds are running perfectly

          Federico Saravia added a comment - I seem to have found the cause of the problem. In my case, I use the Git plugin to receive post commit hooks, those commits have the email of the user that made the changes. The problem is that the plugin parses the changelog and uses a tries to instantiate the class Mailer$UserProperty which is part of the Mailer plugin. Previous versions of Jenkins had the Mailer plugin bundled into Jenkins core, now that Mailer is a separate plugin, and Git plugin doesn't specify it as a dependency, it fails. A quick solution is to install or activate the Mailer plugin, I did that and now all the builds are running perfectly

          Jay Scott added a comment -

          Federico,

          Thanks for that, I have enabled the mailer plugin and that has fixed the issue for me.

          Jay Scott added a comment - Federico, Thanks for that, I have enabled the mailer plugin and that has fixed the issue for me.

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          src/main/java/hudson/plugins/git/GitChangeSet.java
          http://jenkins-ci.org/commit/git-plugin/fe92b34775a927fe420d72d5cf8618ed429ee6dd
          Log:
          [FIXED JENKINS-19345] isolate Mailer-dependent code

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/plugins/git/GitChangeSet.java http://jenkins-ci.org/commit/git-plugin/fe92b34775a927fe420d72d5cf8618ed429ee6dd Log: [FIXED JENKINS-19345] isolate Mailer-dependent code

          We are running exactly into that issue with the git-plugin 2.0.3. But it works with 2.0.1. So there must be a regression bug in 2.0.3. The weird thing is, that we indeed have the mailer plugin installed and still run into that error with git-plugin 2.0.3

          FATAL: hudson/tasks/Mailer$UserProperty
          java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty
          	at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:80)
          	at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:74)
          	at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:51)
          	at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:29)
          	at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:903)
          	at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:877)
          	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:413)
          	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:410)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:710)
          	at hudson.model.Run.execute(Run.java:1690)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:246)
          Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty
          	at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
          	at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
          	at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          	... 13 more
          

          Konrad Windszus added a comment - We are running exactly into that issue with the git-plugin 2.0.3. But it works with 2.0.1. So there must be a regression bug in 2.0.3. The weird thing is, that we indeed have the mailer plugin installed and still run into that error with git-plugin 2.0.3 FATAL: hudson/tasks/Mailer$UserProperty java.lang.NoClassDefFoundError: hudson/tasks/Mailer$UserProperty at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:80) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:74) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:51) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:29) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:903) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:877) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:413) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:410) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:710) at hudson.model.Run.execute(Run.java:1690) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: java.lang.ClassNotFoundException: hudson.tasks.Mailer$UserProperty at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068) at java.lang. ClassLoader .loadClass( ClassLoader .java:358) ... 13 more

          Graham Hay added a comment -

          I'm seeing the same problem having just upgraded to Jenkins 1.557. I have version 2.1.0 of the Git plugin, and version 1.8 of the Mailer plugin. Is there a workaround, or versions of the plugins that are known to work together?

          Graham Hay added a comment - I'm seeing the same problem having just upgraded to Jenkins 1.557. I have version 2.1.0 of the Git plugin, and version 1.8 of the Mailer plugin. Is there a workaround, or versions of the plugins that are known to work together?

          Graham Hay added a comment -

          I uninstalled and re-installed the Git plugin (suggested elsewhere), which seems to have "fixed" it.

          Graham Hay added a comment - I uninstalled and re-installed the Git plugin (suggested elsewhere), which seems to have "fixed" it.

          @Graham Hay I tried what you suggested but I still get the same error every time the GIT plugin updates from the origin repo.

          Valerio Santinelli added a comment - @Graham Hay I tried what you suggested but I still get the same error every time the GIT plugin updates from the origin repo.

          Graham Hay added a comment -

          Yeah, I still had problems after that too. I've since updated to Jenkins 1.558, and v2.2.0 of the Git plugin; and not seen that error recently. I had a look in the commit log for the plugin, but couldn't see anything that was an obvious fix.

          Graham Hay added a comment - Yeah, I still had problems after that too. I've since updated to Jenkins 1.558, and v2.2.0 of the Git plugin; and not seen that error recently. I had a look in the commit log for the plugin, but couldn't see anything that was an obvious fix.

          I solve this problem downgrading the git-client and git plugins to 1.9.0 and 1.5.0 respectively, as Berg Systeme suggested in his blog:
          http://blog.berg-systeme.de/2014/05/15/downgrade-jenkins-git-plugin/

          Rafa Torregrosa added a comment - I solve this problem downgrading the git-client and git plugins to 1.9.0 and 1.5.0 respectively, as Berg Systeme suggested in his blog: http://blog.berg-systeme.de/2014/05/15/downgrade-jenkins-git-plugin/

            ndeloof Nicolas De Loof
            fedesaravia Federico Saravia
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: