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

Jenkins 1.399: java.lang.UnsupportedClassVersionError: Bad version number in .class file using JmDNS 3.4.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Debian Lenny running Linux 2.6.26-2-amd64
      Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)
      Tomcat 5.5
    • Similar Issues:

      Description

      Greetings,

      I have upgraded my Jenkins server at home using the latest 1.399 WAR with the intention to fix #JENKINS-8647 (growing log files due to an issue in JmDNS) but it seems that the compatibility with Java 5 is broken by jmdns-3.4.0.jar

      I get the following stack trace in my catalina.log at server initialization:

      ----------
      28 févr. 2011 22:59:49 hudson.WebAppMain$2 run
      GRAVE: Failed to initialize Hudson
      java.lang.UnsupportedClassVersionError: Bad version number in .class file
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
              at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
              at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
              at hudson.DNSMultiCast.<init>(DNSMultiCast.java:26)
              at hudson.model.Hudson.<init>(Hudson.java:691)
              at hudson.model.Hudson.<init>(Hudson.java:605)
              at hudson.WebAppMain$2.run(WebAppMain.java:221)
      ----------

      I will try to build JmDNS 3.4.0 with a Java 5 JDK and see if it fixes the issue. I believe this should be patched in the next release, I might not be the last person stuck with Java 5

      Thanks & regards,
      --JB.L

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vincent Latombe
            Path:
            changelog.html
            http://jenkins-ci.org/commit/jenkins/d2809f867e985a07a0231a2fd912721c29a4eb3a
            Log:
            [FIXED JENKINS-8914] Use new patched version of jmdns - Update changelog

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: changelog.html http://jenkins-ci.org/commit/jenkins/d2809f867e985a07a0231a2fd912721c29a4eb3a Log: [FIXED JENKINS-8914] Use new patched version of jmdns - Update changelog
            Hide
            brianpreuss Brian Preuß added a comment -

            Same bug returned to Jenkins LTS 1.447.2!

            Show
            brianpreuss Brian Preuß added a comment - Same bug returned to Jenkins LTS 1.447.2!
            Hide
            brianpreuss Brian Preuß added a comment -

            Jenkins ver. 1.447.2

            $ /opt/jdk1.5.0_17/bin/java -Xmx1024m -Xms512m -XX:MaxPermSize=512m -Djava.awt.headless=true -cp /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/svc/tmv723/home/g_tvpp_b/tools/maven/maven-3.0.3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/tools/maven/maven-3.0.3 /home/jenkins/tomcat7/webapps/jenkins/WEB-INF/lib/remoting-2.11.jar /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 62771

            <===[JENKINS REMOTING CAPACITY]===>channel started

            channel stopped
            ERROR: Failed to parse POMs
            java.io.IOException: Remote call on Channel to Maven [/opt/jdk1.5.0_17/bin/java, -Xmx1024m, -Xms512m, -XX:MaxPermSize=512m, -Djava.awt.headless=true, -cp, /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/jenkins/tools/maven/maven-3.0.3/boot/plexus-classworlds-2.4.jar, org.jvnet.hudson.maven3.agent.Maven3Main, /home/jenkins/tools/maven/maven-3.0.3, /home/jenkins/tomcat7/webapps/jenkins/WEB-INF/lib/remoting-2.11.jar, /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar, 62771] failed
            at hudson.remoting.Channel.call(Channel.java:690)
            at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:156)
            at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:794)
            at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:467)
            at hudson.model.Run.run(Run.java:1404)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
            at hudson.model.ResourceController.execute(ResourceController.java:88)
            at hudson.model.Executor.run(Executor.java:238)
            Caused by: java.lang.ClassFormatError: Failed to load javax.servlet.ServletException
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:154)
            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:239)
            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:917)
            at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
            at java.lang.reflect.Field.getLong(Field.java:527)
            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:585)
            at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
            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:585)
            at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
            at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
            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: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:287)
            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:650)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
            at java.lang.Thread.run(Thread.java:595)
            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:152)
            ... 57 more

            Show
            brianpreuss Brian Preuß added a comment - Jenkins ver. 1.447.2 $ /opt/jdk1.5.0_17/bin/java -Xmx1024m -Xms512m -XX:MaxPermSize=512m -Djava.awt.headless=true -cp /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/svc/tmv723/home/g_tvpp_b/tools/maven/maven-3.0.3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/tools/maven/maven-3.0.3 /home/jenkins/tomcat7/webapps/jenkins/WEB-INF/lib/remoting-2.11.jar /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 62771 <=== [JENKINS REMOTING CAPACITY] ===>channel started channel stopped ERROR: Failed to parse POMs java.io.IOException: Remote call on Channel to Maven [/opt/jdk1.5.0_17/bin/java, -Xmx1024m, -Xms512m, -XX:MaxPermSize=512m, -Djava.awt.headless=true, -cp, /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/jenkins/tools/maven/maven-3.0.3/boot/plexus-classworlds-2.4.jar, org.jvnet.hudson.maven3.agent.Maven3Main, /home/jenkins/tools/maven/maven-3.0.3, /home/jenkins/tomcat7/webapps/jenkins/WEB-INF/lib/remoting-2.11.jar, /home/jenkins/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar, 62771] failed at hudson.remoting.Channel.call(Channel.java:690) at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:156) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:794) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:467) at hudson.model.Run.run(Run.java:1404) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Caused by: java.lang.ClassFormatError: Failed to load javax.servlet.ServletException at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:154) 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:239) 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:917) at java.lang.reflect.Field.getFieldAccessor(Field.java:898) at java.lang.reflect.Field.getLong(Field.java:527) 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:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) 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:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) 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: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:287) 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:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) 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:152) ... 57 more
            Hide
            jglick Jesse Glick added a comment -

            Originally reported problem was fixed; if there are other incompatibilities affecting current Jenkins releases, they should be filed separately.

            https://github.com/jenkinsci/jenkins/pull/781 proposes to prevent this kind of error from recurring.

            Show
            jglick Jesse Glick added a comment - Originally reported problem was fixed; if there are other incompatibilities affecting current Jenkins releases, they should be filed separately. https://github.com/jenkinsci/jenkins/pull/781 proposes to prevent this kind of error from recurring.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Baptiste Mathus
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/b02b14764d0be6c0e41e9dc12e1d97d9300154b2
            Log:
            Using mojo extra-enforcer-rules enforceBytecodeVersion.

            This rule enforces a bytecode version in dependencies.
            This would prevent cases like JENKINS-8914 where someone had
            introduced a dependency compiled with JDK1.6 at a time where
            Jenkins was still on 1.5.

            With 1.7 already here and 1.8 coming, this should help no to do that
            again.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Baptiste Mathus Path: pom.xml http://jenkins-ci.org/commit/jenkins/b02b14764d0be6c0e41e9dc12e1d97d9300154b2 Log: Using mojo extra-enforcer-rules enforceBytecodeVersion. This rule enforces a bytecode version in dependencies. This would prevent cases like JENKINS-8914 where someone had introduced a dependency compiled with JDK1.6 at a time where Jenkins was still on 1.5. With 1.7 already here and 1.8 coming, this should help no to do that again.

              People

              • Assignee:
                laurents59 Laurent Schoelens
                Reporter:
                jb_lievremont Jean-Baptiste Lièvremont
              • Votes:
                11 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: