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

Migrating to Jenkins 1.500 break JDK5 compatibility - UnsupportedClassVersionError: Bad version number in .class file

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None
    • SunOS 5.10, JDK5

      The upgrade of the Commons Codec lib from 1.4 to 1.7 with Jenkins 1.500 break the compatibility to build with JDK5.

      The build fails with

      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to load org.apache.commons.codec.DecoderException
      Bad version number in .class file
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.ClassFormatError: Failed to load org.apache.commons.codec.DecoderException
      at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:193)
      at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:144)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      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:621)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
      at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:191)

      Replacing Commons Codec 1.7 with 1.6 seems to fix the problem.
      On the Commons Codec site (http://commons.apache.org/codec/) the following compatibility notes can be found:

      Codec 1.7 requires Java 1.6
      Codec 1.6 requires Java 1.5
      Codec 1.5 requires Java 1.4

      So please downgrade to Commons Codec 1.6 if possible.

          [JENKINS-16554] Migrating to Jenkins 1.500 break JDK5 compatibility - UnsupportedClassVersionError: Bad version number in .class file

          Marco Rothe created issue -

          Marco Rothe added a comment -

          Seems to be caused by the same dependency upgrade

          Marco Rothe added a comment - Seems to be caused by the same dependency upgrade
          Marco Rothe made changes -
          Link New: This issue is related to JENKINS-16542 [ JENKINS-16542 ]

          Marco Rothe added a comment -

          This seems to be the cause of the problem

          Marco Rothe added a comment - This seems to be the cause of the problem
          Marco Rothe made changes -
          Link New: This issue is related to JENKINS-16206 [ JENKINS-16206 ]
          kutzi made changes -
          Priority Original: Major [ 3 ] New: Blocker [ 1 ]
          kutzi made changes -
          Assignee New: kutzi [ kutzi ]
          kutzi made changes -
          Link Original: This issue is related to JENKINS-16542 [ JENKINS-16542 ]
          kutzi made changes -
          Link New: This issue is duplicated by JENKINS-16542 [ JENKINS-16542 ]

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          core/pom.xml
          http://jenkins-ci.org/commit/jenkins/41fc8a10bb8eb0e7b106e25eb643481376ac1829
          Log:
          [FIXED JENKINS-16554] Restored Java 5 compatibility by downgrading to commons codec 1.6


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html core/pom.xml http://jenkins-ci.org/commit/jenkins/41fc8a10bb8eb0e7b106e25eb643481376ac1829 Log: [FIXED JENKINS-16554] Restored Java 5 compatibility by downgrading to commons codec 1.6 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            kutzi kutzi
            marco_rothe Marco Rothe
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: