开发者

tomcat eclipse mssql driver demanding Java 1.6

开发者 https://www.devze.com 2023-03-14 08:43 出处:网络
I started writing my servlet in Java 1.6 for tomcat 7, but then I later needed to roll back to Java 1.开发者_开发技巧5 for tomcat 6.I\'m using eclipse.For some reason though, when I try to run my serv

I started writing my servlet in Java 1.6 for tomcat 7, but then I later needed to roll back to Java 1.开发者_开发技巧5 for tomcat 6. I'm using eclipse. For some reason though, when I try to run my servlet it gives me the following error:

SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Please use the JDBC 4 driver (sqljdbc4.jar) instead. Jun 20, 2011 12:33:40 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Auth threw exception java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Please use the JDBC 4 driver (sqljdbc4.jar) instead.

Now originally I had sqljdbc4.jar in my WEB-INF/lib directory but I swapped it out for sqljdbc.jar so that it would be 1.5 compatible. That's when I started getting the error. Hunting around in the properties panels, I saw that JVM 1.6 was still in the Build Path libraries so I deleted those. But now it can't find HTTPServlet!

I added back a servlet.jar file I had but it just gives me the "version 1.6 is not supported by this driver" message. Curiously, I also have to use the oracle jdbc driver for this servlet and it is not giving me these errors when I backgraded the project and the driver jar to the 1.5 compatible version.

How do I get the eclipse project to not think it is 1.6?


You may need to change the Java facet from 1.6 to 1.5:

Project properties → Project Facets → Java → 1.5

tomcat eclipse mssql driver demanding Java 1.6

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号