javac3p0unsupported-class-version

C3P0 in Java 1.5 fails: UnsupportedClassVersionError


According to documentation:

c3p0-0.9.5-pre5 requires a level 1.5.x or above Java Runtime Environment. c3p0 works fine under Java 1.5.x and 1.6.x as well.

But in practice i am getting UnsupportedClassVersionError.

I'm using Spring but not Hibernate with jdk1.5.0_14. C3P0 v0.9.2.1 works fine.

Has anyone got this combo working ?


Solution

  • Looking at the source code, you can see that version is compiled for 1.6.

    # we compile against jdk 1.7, but output jdk 1.6 compatible classfiles.
    jvm.target.version=1.6