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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • 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

      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

          [JENKINS-8914] Jenkins 1.399: java.lang.UnsupportedClassVersionError: Bad version number in .class file using JmDNS 3.4.0

          Jean-Baptiste Lièvremont created issue -

          Marco Rothe added a comment -

          Seems as need jmdns 3.4.0 to be rebuild as 3.2.1 before (see JENKINS-6653).

          Marco Rothe added a comment - Seems as need jmdns 3.4.0 to be rebuild as 3.2.1 before (see JENKINS-6653 ).
          Marco Rothe made changes -
          Link New: This issue is related to JENKINS-6653 [ JENKINS-6653 ]
          Marco Rothe made changes -
          Link New: This issue is related to JENKINS-8647 [ JENKINS-8647 ]
          Marco Rothe made changes -
          Link New: This issue duplicates JENKINS-8909 [ JENKINS-8909 ]

          An idea from Cedric Beust: http://beust.com/weblog/2011/02/21/verifying-the-version-of-your-java-classes/.
          If Jenkins's supported JDK is JDK5, then it might be a good idea to check that.

          Cheers

          Baptiste Mathus added a comment - An idea from Cedric Beust: http://beust.com/weblog/2011/02/21/verifying-the-version-of-your-java-classes/ . If Jenkins's supported JDK is JDK5, then it might be a good idea to check that. Cheers

          Wayne Duran added a comment -

          Got this error after upgrading Jenkins to 1.400 from 1.396. A suggested workaround was to use an update JDK (JDK5 installed by default). Unfortunately, I use a PPC Mac OS 10.5 so an upgrade to JDK6 is not possible because it only works for Intel machines for now. Same problem with installing OpenJDK6.

          I upgraded to 1.400 after installing some plugins and finding out that some of them require the newest version. I run jenkins using "java -jar jenkins.war" in terminal and got this error:

          java.lang.UnsupportedClassVersionError: Bad version number in .class file
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
          at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at winstone.classLoader.WebappClassLoader.loadClass(WebappClassLoader.java:68)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
          at hudson.DNSMultiCast.(DNSMultiCast.java:26)
          at hudson.model.Hudson.(Hudson.java:691)
          at hudson.model.Hudson.(Hudson.java:605)
          at hudson.WebAppMain$2.run(WebAppMain.java:221)

          P.S. Sorry if I'm not using the terms right. This is my first foray into CI and I use PHP at work. I don't know much about Java.

          Wayne Duran added a comment - Got this error after upgrading Jenkins to 1.400 from 1.396. A suggested workaround was to use an update JDK (JDK5 installed by default). Unfortunately, I use a PPC Mac OS 10.5 so an upgrade to JDK6 is not possible because it only works for Intel machines for now. Same problem with installing OpenJDK6. I upgraded to 1.400 after installing some plugins and finding out that some of them require the newest version. I run jenkins using "java -jar jenkins.war" in terminal and got this error: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:676) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at winstone.classLoader.WebappClassLoader.loadClass(WebappClassLoader.java:68) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375) at hudson.DNSMultiCast.(DNSMultiCast.java:26) at hudson.model.Hudson.(Hudson.java:691) at hudson.model.Hudson.(Hudson.java:605) at hudson.WebAppMain$2.run(WebAppMain.java:221) P.S. Sorry if I'm not using the terms right. This is my first foray into CI and I use PHP at work. I don't know much about Java.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/pom.xml
          http://jenkins-ci.org/commit/core/fbac722627164bf9332a1795c4ebfa7dc380c3f8
          Log:
          [FIXED JENKINS-8914] fixed the JDK1.6 dependency that has crept in 1.400

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/pom.xml http://jenkins-ci.org/commit/core/fbac722627164bf9332a1795c4ebfa7dc380c3f8 Log: [FIXED JENKINS-8914] fixed the JDK1.6 dependency that has crept in 1.400
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Kohsuke Kawaguchi made changes -
          Link New: This issue is duplicated by JENKINS-9014 [ JENKINS-9014 ]

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

              Created:
              Updated:
              Resolved: