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

Maven cannot run with JDK1.5 anymore

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: maven-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      Since an update to jenkins 1.395 the maven projects running with an JDK 1.5 arent working anymore.

      The error "Bad version number in .class file" looks like something got compiled with a newer java version. This error happens on a slave with maven 2.0.11 and oracle-jdk 1.5.21.

      • When i reconfigure the project to oracle-jdk 1.6.20 it works.
      • It also works with java 1.5 when executed directly on den shell.
        -> The only thing different there is the magic agent stuff.

      So i extracted the jars : maven-interceptor, maven-agent, slave.jar, classworlds. Non of which there seems to be a newer .class version number. Any ideas which files could cause the problem? Pretty sure this is a jenkins issue, otherwise maven wouldn't compile it directly on the build system.

      LOG:

      At revision 56650
      no change for http://.../trunk since the previous build
      Found mavenVersion 2.0.11 from file jar:file:/srv/hudson/tools/maven-2.0.x/lib/maven-2.0.11-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
      No emails were triggered.
      Parsing POMs
      [maven-versioninfo-plugin] $ /srv/hudson/tools/Java-1.5.x/bin/java -Xmx512m -Xms64m -XX:PermSize=64m -XX:MaxPermSize=128m -cp /srv/hudson/maven-agent.jar:/srv/hudson/classworlds.jar hudson.maven.agent.Main /srv/hudson/tools/maven-2.0.x /srv/hudson/slave.jar /srv/hudson/maven-interceptor.jar 44373
      <===[HUDSON REMOTING CAPACITY]===>���channel started
      channel stopped
      ERROR: POMs konnten nicht geparst werden
      java.io.IOException: Remote call on Channel to Maven [/srv/hudson/tools/Java-1.5.x/bin/java, -Xmx512m, -Xms64m, -XX:PermSize=64m, -XX:MaxPermSize=128m, -cp, /srv/hudson/maven-agent.jar:/srv/hudson/classworlds.jar, hudson.maven.agent.Main, /srv/hudson/tools/maven-2.0.x, /srv/hudson/slave.jar, /srv/hudson/maven-interceptor.jar, 44373] failed
      	at hudson.remoting.Channel.call(Channel.java:638)
      	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:156)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:665)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:420)
      	at hudson.model.Run.run(Run.java:1362)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:424)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:145)
      Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:151)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:131)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      	at hudson.plugins.cobertura.MavenCoberturaPublisher.<clinit>(MavenCoberturaPublisher.java:237)
      	at sun.misc.Unsafe.ensureClassInitialized(Native Method)
      	at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
      	at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
      	at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
      	at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
      	at java.lang.reflect.Field.getLong(Field.java:528)
      	at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1586)
      	at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
      	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
      	at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
      	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      	at java.util.ArrayList.readObject(ArrayList.java:591)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:592)
      	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1812)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      	at java.util.HashMap.readObject(HashMap.java:1067)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:592)
      	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1812)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1910)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1834)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      	at hudson.remoting.UserRequest.deserialize(UserRequest.java:178)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:98)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
      	at java.lang.Thread.run(Thread.java:595)
      

        Attachments

          Activity

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              rainerw Rainer Weinhold
            • Votes:
              7 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: