Created a web app using maven and deployed it on heroku. Everything works find but when I call a action that uses the postgresql-9.2-1002.jdbc4 driver I get:
java.lang.UnsupportedClassVersionError: org/postgresql/Driver : Unsupported major.minor version 51.0 (unable to load class org.postgresql.Driver)
I know that the problem is I'm using jdk 7 on my development environment and a lower version is running on heroku (at least I think so). My first question is, why does the other actions don't give this error only actions that uses postqresql driver gives this problem the rest of the app works just fine? The other thing I did was download jdk 6 and then added it to my project build path, then configure eclipse compiler compliance to 1.6 but even then I have the same problem. How can I solve this?
Refer to this table for a list of the major version of the Java class file. To fix it, download the Java or JDK 7, and change the default JDK from 6 to 7.
minor version 52.0, the class is compiled using JDK 8 since major version 52 corresponds to Java SE 8.
For java 6 use:
postgresql-9.2-1004-jdbc4.jar postgresql-9.3-1100-jdbc4.jar
For java 7 use:
postgresql-9.2-1004-jdbc41.jar postgresql-9.3-1100-jdbc41.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With