This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
javax.servlet.ServletException: Bad version number in .class file
I've spent several hours trying to figure out what's wrong. Do you have any idea?
I have checked Tomcat's classpath and it seems to be alright, pointing to the right version of sql driver.
Tomcat can't load that class, which it looks like it's the JDBC driver class, because that class was compiled with a version of Java which Tomcat doesn't understand. This would be a later Java version than the one Tomcat is running under.
For example you might be running Tomcat with a Java 5 JDK but the device driver was compiled with a Java 6 JDK.
Joined: Nov 04, 2010
Paul Clapham wrote:For example you might be running Tomcat with a Java 5 JDK but the device driver was compiled with a Java 6 JDK.
ok, it makes sense.
I have Java 5 installed on this machine and used older version of JDBC driver: mssqlserver.jar
It worked fine with SQL Server 2000.
Now, when I upgraded to SQL Server 2005, I also downloaded a new version of JDBC driver: sqljdbc4.jar
But it seems that this driver was made in Java 6.
I returned to the old version of the JDBC driver mssqlserver.jar and it works.
I still don't understand how is it possible that the older version of JDBC driver works with newer version of SQL Server?