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

Cannot run maven x.x builds after LTS 1.509.4 upgrade because of InvalidClassException PlexusModuleContributorFactory

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
    • Environment:
      jenkins : 1.509.4
      maven plugin : 1.509.4

      Slave : SUSE with ( JRE 1.6.0 IBM J9 2.4 )
      Master : Ubuntu with ( Oracle 1.6.0_26-b03 )
    • Similar Issues:

      Description

      After upgrading from 1.509.2 to 1.509.4 some maven projects fail with an "java.io.InvalidClassException: hudson.maven.PlexusModuleContributorFactory$1;" exception.

      tried, but did not help:

      • different maven version: 2.2.11, 3.0.3 , 3.1.0
      • create new empty project
      • remove all files from slave so jenkins had to copy slave files + maven

      Guessing the problem could be the other JVM on the Slave? Its an IBM JVM 1.6.0 while the master is an Oracle JVM. But on the other hand this is no issue with maven 1.509.2 plugin. Projects on another slave ( Oracle VM, Ubuntu) are still working.

      Workaround: Downgrade maven plugin to 1.509.2

      LOG:

      No emails were triggered.
      Parsing POMs
      ERROR: Failed to parse POMs
      hudson.util.IOException2: remote file operation failed: /srv/jenkins-baubau/workspace/BauBau-Dataservice-Build at hudson.remoting.Channel@539bd9e8:BauBau-buildserver
      at hudson.FilePath.act(FilePath.java:906)
      at hudson.FilePath.act(FilePath.java:883)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:922)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:654)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
      at hudson.model.Run.execute(Run.java:1592)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:508)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)
      Caused by: java.io.InvalidClassException: hudson.maven.PlexusModuleContributorFactory$1; local class incompatible: stream classdesc serialVersionUID = -8108615509280767004, local class serialVersionUID = 878384944515657062
      at java.io.InvalidClassException.<init>(InvalidClassException.java:62)
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:601)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
      at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
      at hudson.remoting.UserRequest.perform(UserRequest.java:98)
      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:314)
      at java.util.concurrent.FutureTask.run(FutureTask.java:149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
      at java.lang.Thread.run(Thread.java:736)

        Attachments

          Activity

          rainerw Rainer Weinhold created issue -
          rainerw Rainer Weinhold made changes -
          Field Original Value New Value
          Description After upgrading from 1.509.2 to 1.509.4 some maven projects fail with an "java.io.InvalidClassException: hudson.maven.PlexusModuleContributorFactory$1;" exception.

          tried, but did not help:
          - different maven version: 2.2.11, 3.0.3 , 3.1.0
          - create new empty project
          - remove all files from slave so jenkins had to copy slave files + maven

          Guessing the problem could be the other VM on the Slave? Its an IBM JVM 1.6.0 while the master is an oracle VM. But on the other hand this was not changed and did work with 1.509.2. It seems to work an another slave which has an oracle VM.

          *Workaround*: Downgrade maven plugin to 1.509.2


          LOG:

          No emails were triggered.
          Parsing POMs
          ERROR: Failed to parse POMs
          hudson.util.IOException2: remote file operation failed: /srv/jenkins-baubau/workspace/BauBau-Dataservice-Build at hudson.remoting.Channel@539bd9e8:BauBau-buildserver
          at hudson.FilePath.act(FilePath.java:906)
          at hudson.FilePath.act(FilePath.java:883)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:922)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:654)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
          at hudson.model.Run.execute(Run.java:1592)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:508)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          Caused by: java.io.InvalidClassException: hudson.maven.PlexusModuleContributorFactory$1; local class incompatible: stream classdesc serialVersionUID = -8108615509280767004, local class serialVersionUID = 878384944515657062
          at java.io.InvalidClassException.<init>(InvalidClassException.java:62)
          at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:601)
          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
          at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
          at hudson.remoting.UserRequest.perform(UserRequest.java:98)
          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:314)
          at java.util.concurrent.FutureTask.run(FutureTask.java:149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
          at java.lang.Thread.run(Thread.java:736)
          After upgrading from 1.509.2 to 1.509.4 some maven projects fail with an "java.io.InvalidClassException: hudson.maven.PlexusModuleContributorFactory$1;" exception.

          tried, but did not help:
          - different maven version: 2.2.11, 3.0.3 , 3.1.0
          - create new empty project
          - remove all files from slave so jenkins had to copy slave files + maven

          Guessing the problem could be the other JVM on the Slave? Its an IBM JVM 1.6.0 while the master is an Oracle JVM. But on the other hand this is no issue with maven 1.509.2 plugin. Projects on another slave ( Oracle VM, Ubuntu) are still working.

          *Workaround*: Downgrade maven plugin to 1.509.2


          LOG:

          No emails were triggered.
          Parsing POMs
          ERROR: Failed to parse POMs
          hudson.util.IOException2: remote file operation failed: /srv/jenkins-baubau/workspace/BauBau-Dataservice-Build at hudson.remoting.Channel@539bd9e8:BauBau-buildserver
          at hudson.FilePath.act(FilePath.java:906)
          at hudson.FilePath.act(FilePath.java:883)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:922)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:654)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
          at hudson.model.Run.execute(Run.java:1592)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:508)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          Caused by: java.io.InvalidClassException: hudson.maven.PlexusModuleContributorFactory$1; local class incompatible: stream classdesc serialVersionUID = -8108615509280767004, local class serialVersionUID = 878384944515657062
          at java.io.InvalidClassException.<init>(InvalidClassException.java:62)
          at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:601)
          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
          at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
          at hudson.remoting.UserRequest.perform(UserRequest.java:98)
          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:314)
          at java.util.concurrent.FutureTask.run(FutureTask.java:149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
          at java.lang.Thread.run(Thread.java:736)
          Hide
          drpaul65 Paul Gorman added a comment - - edited

          I have the same issue with a Windows Server 2008 R2 master (Oracle JDK 1.7.0_25) and SUSE Linux slaves (IBM JDKs 1.6).
          Downgrading to Jenkins 1.509.2 also fixed the problem.

          Show
          drpaul65 Paul Gorman added a comment - - edited I have the same issue with a Windows Server 2008 R2 master (Oracle JDK 1.7.0_25) and SUSE Linux slaves (IBM JDKs 1.6). Downgrading to Jenkins 1.509.2 also fixed the problem.
          jglick Jesse Glick made changes -
          Labels 1.509.4 lts
          jglick Jesse Glick made changes -
          Labels regression
          Hide
          jglick Jesse Glick added a comment -

          Generally anonymous inner classes should not be allowed to be serialized, since I have heard that some JREs apparently disagree with the Oracle JRE on how to compute a default serial version UID (despite the fact that the exact algorithm is a documented part of the Java platform specification). Fix is probably a matter of factoring out PlexusModuleContributorFactory$1 into a static nested class with an explicit private static final long serialVersionUID = 1;.

          Show
          jglick Jesse Glick added a comment - Generally anonymous inner classes should not be allowed to be serialized, since I have heard that some JREs apparently disagree with the Oracle JRE on how to compute a default serial version UID (despite the fact that the exact algorithm is a documented part of the Java platform specification). Fix is probably a matter of factoring out PlexusModuleContributorFactory$1 into a static nested class with an explicit private static final long serialVersionUID = 1; .
          kutzi kutzi made changes -
          Assignee kutzi [ kutzi ]
          Hide
          kutzi kutzi added a comment -

          Cannot reproduce locally with Oracle JVM 7 as master and IBM VM 6.0 (J9 2.4), but generally agree with Jesse that we should have serialVersionUID defined on everything which goes over the wire during maven builds.
          We've seen several errors like this before.

          Show
          kutzi kutzi added a comment - Cannot reproduce locally with Oracle JVM 7 as master and IBM VM 6.0 (J9 2.4), but generally agree with Jesse that we should have serialVersionUID defined on everything which goes over the wire during maven builds. We've seen several errors like this before.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/maven/MavenModuleSetBuild.java
          src/main/java/hudson/maven/PlexusModuleContributor.java
          src/main/java/hudson/maven/PlexusModuleContributorFactory.java
          http://jenkins-ci.org/commit/maven-plugin/0352b3c4861eb97ee385678fbddc68a95fad87bd
          Log:
          [FIXED JENKINS-19978] Prevent serialization errors if master and slave are using different VMs by adding serialVersionUIDs

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/maven/MavenModuleSetBuild.java src/main/java/hudson/maven/PlexusModuleContributor.java src/main/java/hudson/maven/PlexusModuleContributorFactory.java http://jenkins-ci.org/commit/maven-plugin/0352b3c4861eb97ee385678fbddc68a95fad87bd Log: [FIXED JENKINS-19978] Prevent serialization errors if master and slave are using different VMs by adding serialVersionUIDs
          scm_issue_link SCM/JIRA link daemon made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          kutzi kutzi added a comment -

          Would be nice if you could try https://www.dropbox.com/sh/kjkh5g3r68kmlj7/JvgKJnf7gp before I do a release from it

          Show
          kutzi kutzi added a comment - Would be nice if you could try https://www.dropbox.com/sh/kjkh5g3r68kmlj7/JvgKJnf7gp before I do a release from it
          Hide
          rainerw Rainer Weinhold added a comment -

          The Exception is now different with your Version (2.0-beta-2-SNAPSHOT (private-10/21/2013 19:02-kutzi)):

          Total time: 30.412 secs
          FATAL: hudson.maven.MavenBuild.pickArtifactManager()Ljenkins/model/ArtifactManager;
          java.lang.NoSuchMethodError: hudson.maven.MavenBuild.pickArtifactManager()Ljenkins/model/ArtifactManager;
          at hudson.maven.MavenBuild$ProxyImpl.performArchiving(MavenBuild.java:455)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:825)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)
          at hudson.model.Run.execute(Run.java:1592)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)

          Show
          rainerw Rainer Weinhold added a comment - The Exception is now different with your Version (2.0-beta-2-SNAPSHOT (private-10/21/2013 19:02-kutzi)): Total time: 30.412 secs FATAL: hudson.maven.MavenBuild.pickArtifactManager()Ljenkins/model/ArtifactManager; java.lang.NoSuchMethodError: hudson.maven.MavenBuild.pickArtifactManager()Ljenkins/model/ArtifactManager; at hudson.maven.MavenBuild$ProxyImpl.performArchiving(MavenBuild.java:455) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:825) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565) at hudson.model.Run.execute(Run.java:1592) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237)
          Hide
          rainerw Rainer Weinhold added a comment -

          fix does not run on lts.

          Show
          rainerw Rainer Weinhold added a comment - fix does not run on lts.
          rainerw Rainer Weinhold made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          jglick Jesse Glick added a comment -

          @rainerw the Maven plugin 2.x is not available for the defunct 1.509.x line. It needs 1.532 or later. Sorry.

          Show
          jglick Jesse Glick added a comment - @rainerw the Maven plugin 2.x is not available for the defunct 1.509.x line. It needs 1.532 or later. Sorry.
          jglick Jesse Glick made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          docwhat Christian Höltje added a comment -

          @jglick – I have no idea what you mean "defunct 1.509.x"; according to the front page 1.509.4 is the current Long Term Support version. Is the front page wrong or is Long Term Support not supported?

          Detailed work around instructions:

          1. Go to the plugins directory in your Jenkins installation.
          2. rm -rf maven-plugin maven-plugin.jpi
          3. curl -L -o maven-plugin.jpi http://updates.jenkins-ci.org/download/plugins/maven-plugin/1.509.3/maven-plugin.hpi
          4. touch maven-plugin.jpi.pinned

          This will prevent Jenkins from auto-updating the maven-plugin on restart and sets the version to 1.509.3 which doesn't have this show-stopper bug.

          Show
          docwhat Christian Höltje added a comment - @jglick – I have no idea what you mean "defunct 1.509.x"; according to the front page 1.509.4 is the current Long Term Support version. Is the front page wrong or is Long Term Support not supported? Detailed work around instructions: 1. Go to the plugins directory in your Jenkins installation. 2. rm -rf maven-plugin maven-plugin.jpi 3. curl -L -o maven-plugin.jpi http://updates.jenkins-ci.org/download/plugins/maven-plugin/1.509.3/maven-plugin.hpi 4. touch maven-plugin.jpi.pinned This will prevent Jenkins from auto-updating the maven-plugin on restart and sets the version to 1.509.3 which doesn't have this show-stopper bug.
          Hide
          jglick Jesse Glick added a comment -

          @docwhat the front page is wrong. The current LTS is 1.532.1.

          Show
          jglick Jesse Glick added a comment - @docwhat the front page is wrong. The current LTS is 1.532.1.
          Hide
          rainerw Rainer Weinhold added a comment - - edited

          Did upgrade to 1.532.1 and your SNAPSHOT Maven Version works.

          @kutzi sorry for posting here 'not working' before, forgot to install the snapshot version of the maven plugin

          Show
          rainerw Rainer Weinhold added a comment - - edited Did upgrade to 1.532.1 and your SNAPSHOT Maven Version works. @kutzi sorry for posting here 'not working' before, forgot to install the snapshot version of the maven plugin
          rainerw Rainer Weinhold made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          jglick Jesse Glick made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 151500 ] JNJira + In-Review [ 193956 ]

            People

            • Assignee:
              kutzi kutzi
              Reporter:
              rainerw Rainer Weinhold
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: