com.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. The target server must be SQL Server 2000 or later.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.Prelogin(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.<init>(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.zuxia.util.DBUtil.getConn(DBUtil.java:40)
at com.zuxia.dao.GoodsTypeDao.getAllGoodType(GoodsTypeDao.java:25)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:186)
After spending some time , I found that this issue will normally occur when you are using a older verison of JDBC driver to connect to sql server 2008. So make sure you are using sql server 2008 JDBC driver and you do not have sqlserver 2005 JDBC drivers in the classpath or in server/default/lib folder.
When you download the SQlserver 2008 JDBC driver from the Microsoft website, you will get two jar files: sqljdbc4.jar and sqljdbc.jar.
For JDK5 – use sqljdbc.jar
for JDK6 – use sqljdbc4.jar
When you JDK1.5 and trying to load sqljdbc4.jar, you might get the below exception.So use sqljdbc.jar[2008]
Exceptionjava.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
他的意思是驱动版本低了,改换就可以了,
JDK5 – use sqljdbc.jar
JDK6 – use sqljdbc4.jar