at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.Prelogin(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.
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:525)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at jdbctest.TestConnection.
at jdbctest.TestConnection.main(TestConnection.java:41)
getConnection failed: com.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. The target server must be SQL Server 2000 or later.
Exceptioncom.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. The target server must be SQL Server 2000 or later.
This issue will normally occur when you are using a older verison of JDBC driver[may be 2005's] 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.
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
No comments:
Post a Comment