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

java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class javax.jmdns.JmDNS

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Solaris, Sun JVM 1.5.0_15

      Release 1.359 fails to start, giving:

      java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class javax.jmdns.JmDNS)
      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1854)
      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at hudson.DNSMultiCast.(DNSMultiCast.java:24)
      at hudson.model.Hudson.(Hudson.java:628)
      at hudson.model.Hudson.(Hudson.java:545)
      at hudson.WebAppMain$2.run(WebAppMain.java:222)

      To me that suggests that the jmdns lib was compiled with a JDK > 1.5. This causes Hudson to fail to load on a JVM =< 1.5.

          [JENKINS-6653] java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class javax.jmdns.JmDNS

          Or maybe not. I dl'd the jmdns code and rebuilt with JDK 1.5.0_22-b03 (Sun Microsystems Inc.), replaced the jmdns-3.1.6.jar file in WEB-INF/lib, but still see the same error.

          Glenn J. Mason added a comment - Or maybe not. I dl'd the jmdns code and rebuilt with JDK 1.5.0_22-b03 (Sun Microsystems Inc.), replaced the jmdns-3.1.6.jar file in WEB-INF/lib, but still see the same error.

          Actually, rebuilding jmdns and restarting Hudson+Tomcat seems to have worked. The ant build.xml for jmdns source does specify target="1.5", so not sure why it didn't work. Maybe someone Out There can have a play and figure it out a little better than I?

          Glenn J. Mason added a comment - Actually, rebuilding jmdns and restarting Hudson+Tomcat seems to have worked. The ant build.xml for jmdns source does specify target="1.5", so not sure why it didn't work. Maybe someone Out There can have a play and figure it out a little better than I?

          jmdns 3.1.6 is compiled with Java6 class file format. The new 3.1.6-hudson-2 version is rebuilt with 1.5.

          Kohsuke Kawaguchi added a comment - jmdns 3.1.6 is compiled with Java6 class file format. The new 3.1.6-hudson-2 version is rebuilt with 1.5.

          Code changed in hudson
          User: : kohsuke
          Path:
          branches/rc/core/pom.xml
          branches/rc/core/src/main/java/hudson/DNSMultiCast.java
          http://jenkins-ci.org/commit/31483
          Log:
          [FIXED JENKINS-6653]
          Merged revisions 31436,31438 via svnmerge from
          https://www.dev.java.net/svn/hudson/trunk/hudson/main

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: branches/rc/core/pom.xml branches/rc/core/src/main/java/hudson/DNSMultiCast.java http://jenkins-ci.org/commit/31483 Log: [FIXED JENKINS-6653] Merged revisions 31436,31438 via svnmerge from https://www.dev.java.net/svn/hudson/trunk/hudson/main

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/31487
          Log:
          noting a fix for JENKINS-6653 in 1.360.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/www/changelog.html http://jenkins-ci.org/commit/31487 Log: noting a fix for JENKINS-6653 in 1.360.

            Unassigned Unassigned
            glennji Glenn J. Mason
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: