Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19105

java.lang.NoClassDefFoundError: org/jvnet/hudson/maven3/listeners/HudsonMavenExecutionResult

      After upgrading to Jenkins 1.526 and updating plugins to latest, my Maven 3.0.x builds are failing with the following exception:

      <===[JENKINS REMOTING CAPACITY]===>channel started
      using global settings config with name Artifactory Mirrors
      channel stopped
      ERROR: Failed to parse POMs
      java.io.IOException: Remote call on Channel to Maven [/var/lib/jenkins/tools/hudson.model.JDK/Current/bin/java, -Xms512m, -Xmx512m, -Dm3plugin.lib=/var/lib/jenkins/cache/artifactory-plugin/2.1.7, -cp, /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.4.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/3.0.x/boot/plexus-classworlds-2.4.jar, org.jvnet.hudson.maven3.agent.Maven3Main, /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/3.0.x, /var/cache/jenkins/war/WEB-INF/lib/remoting-2.30.jar, /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.4.jar, /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.4.jar, 39861] failed
      	at hudson.remoting.Channel.call(Channel.java:723)
      	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:160)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:813)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
      	at hudson.model.Run.execute(Run.java:1597)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:247)
      Caused by: java.lang.NoClassDefFoundError: org/jvnet/hudson/maven3/listeners/HudsonMavenExecutionResult
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      	at java.lang.Class.getMethod0(Class.java:2670)
      	at java.lang.Class.getMethod(Class.java:1603)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:117)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:67)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.ClassNotFoundException: org.jvnet.hudson.maven3.listeners.HudsonMavenExecutionResult
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      	... 15 more
      

          [JENKINS-19105] java.lang.NoClassDefFoundError: org/jvnet/hudson/maven3/listeners/HudsonMavenExecutionResult

          Downgrading both Jenkins and the Maven Integration plugin to 1.525, and restarting Jenkins, seems to have resolved this.

          Rob van Oostrum added a comment - Downgrading both Jenkins and the Maven Integration plugin to 1.525, and restarting Jenkins, seems to have resolved this.

          kutzi added a comment -

          Are you using the artifactory plugin?

          kutzi added a comment - Are you using the artifactory plugin?

          I am

          Rob van Oostrum added a comment - I am

          kutzi added a comment -

          kutzi added a comment - Caused by https://github.com/jenkinsci/maven-interceptors/commit/a3170a3474b57f0914b38e318f320e34bc13f13b

          Tim Boven added a comment -

          I'm also using the artifactory plugin (latest version)

          Tim Boven added a comment - I'm also using the artifactory plugin (latest version)

          I also got the same issue. I am also using the artifactory plugin.
          Is there any workaround for this?

          Stephan Bluemel added a comment - I also got the same issue. I am also using the artifactory plugin. Is there any workaround for this?

          aflat added a comment -

          I'm getting the same issue, jenkins 1.526, update maven plugin 1.526, and artifactory plugin(2.1.7), still not working.

          aflat added a comment - I'm getting the same issue, jenkins 1.526, update maven plugin 1.526, and artifactory plugin(2.1.7), still not working.

          aflat added a comment -

          Downgrading to jenkins 1.525 , then downgrading artifactory 2.1.5 didn't fix it either.

          aflat added a comment - Downgrading to jenkins 1.525 , then downgrading artifactory 2.1.5 didn't fix it either.

          You need to downgrade the Maven Integration Plugin to 1.525 as well. I didn't have to touch the Artifactory plugin at all.

          Rob van Oostrum added a comment - You need to downgrade the Maven Integration Plugin to 1.525 as well. I didn't have to touch the Artifactory plugin at all.

          aflat added a comment -

          That is part of the jenkins core now, so downgrading jenkins should downgrade the plugin as well. Unfortunately, the plugin was marked as pinned, so it didn't downgrade for me, until I unpinned it

          In addition, with jenkins 1.525 you still need artifactory 2.1.7(maybe 2.1.6, not sure, I went from 2.1.5 to 2.1.7) so don't downgrade artifactory.

          aflat added a comment - That is part of the jenkins core now, so downgrading jenkins should downgrade the plugin as well. Unfortunately, the plugin was marked as pinned, so it didn't downgrade for me, until I unpinned it In addition, with jenkins 1.525 you still need artifactory 2.1.7(maybe 2.1.6, not sure, I went from 2.1.5 to 2.1.7) so don't downgrade artifactory.

          Terry Rankine added a comment -

          when is this scheduled to be addressed?

          Terry Rankine added a comment - when is this scheduled to be addressed?

          James McPhee added a comment -

          I've also found that using maven2 instead of maven3 on the local system bypasses this. If the app in question can handle that, of course.

          James McPhee added a comment - I've also found that using maven2 instead of maven3 on the local system bypasses this. If the app in question can handle that, of course.

          Bob Tiernay added a comment - - edited

          I'm also getting the same exception using:

          • Jenkins 1.528
          • Jenkins Artifactory Plugin 2.1.7
          • Maven Integration plugin 1.528

          Note that I also get the following message:

          Property '-Dm3plugin.lib' is already part of MAVEN_OPTS. This is usually a leftover of previous build which was forcibly stopped. Replacing the value with an updated one. Please remove it from the job configuration.
          Parsing POMs

          Which seems to be related to https://www.jfrog.com/jira/browse/HAP-393

          Bob Tiernay added a comment - - edited I'm also getting the same exception using: Jenkins 1.528 Jenkins Artifactory Plugin 2.1.7 Maven Integration plugin 1.528 Note that I also get the following message: Property '-Dm3plugin.lib' is already part of MAVEN_OPTS . This is usually a leftover of previous build which was forcibly stopped. Replacing the value with an updated one. Please remove it from the job configuration. Parsing POMs Which seems to be related to https://www.jfrog.com/jira/browse/HAP-393

          Henri Gomez added a comment -

          Same problem here

          • Jenkins 1.528
          • Maven Integration plugin 1.528
          • Artifactory 2.1.7

          Where should it be fixed ? In Artifactory Plugin or Jenkins ?

          Henri Gomez added a comment - Same problem here Jenkins 1.528 Maven Integration plugin 1.528 Artifactory 2.1.7 Where should it be fixed ? In Artifactory Plugin or Jenkins ?

          Nicolas De Loof added a comment - this class was moved to maven3-interceptor-commons, that is missing in https://github.com/jenkinsci/artifactory-plugin/blob/master/src/main/resources/org/jfrog/hudson/maven3/classworlds-native.conf

          This issue is do to artifactory plugin to copy https://github.com/jenkinsci/maven-interceptors/blob/master/maven31-agent/src/main/resources/jenkins/maven3/agent/classworlds.conf for it's own "hack" to classworld. A better solution would be for maven-plugin to offer an extension point to customize classworld libraries, artifactory plugin could use to add it's custom m3plugin lib

          Nicolas De Loof added a comment - This issue is do to artifactory plugin to copy https://github.com/jenkinsci/maven-interceptors/blob/master/maven31-agent/src/main/resources/jenkins/maven3/agent/classworlds.conf for it's own "hack" to classworld. A better solution would be for maven-plugin to offer an extension point to customize classworld libraries, artifactory plugin could use to add it's custom m3plugin lib

          need to be fixed in Artifactory plugin, so opened https://www.jfrog.com/jira/browse/HAP-428

          Nicolas De Loof added a comment - need to be fixed in Artifactory plugin, so opened https://www.jfrog.com/jira/browse/HAP-428

          Olivier Lamy added a comment - see https://github.com/jenkinsci/maven-interceptors/commit/a3170a3474b57f0914b38e318f320e34bc13f13b#commitcomment-3825623

          Henri Gomez added a comment -

          Kudos to Nicolas, analysis was fast and precise.

          Thanks

          Henri Gomez added a comment - Kudos to Nicolas, analysis was fast and precise. Thanks

          Bob Tiernay added a comment -

          This seems to be fixed using Jenkins Artifactory Plugin 2.1.8

          Bob Tiernay added a comment - This seems to be fixed using Jenkins Artifactory Plugin 2.1.8

            Unassigned Unassigned
            rvanoo Rob van Oostrum
            Votes:
            18 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved: