JDBC Driver for SQL Server 2014

We recently migrated to SQL Server 2014 from JAVA 5 on one machine and JAVA 6 on another (this is a requirement). When I try to connect to the database, I get the following exception.

org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (
       com.microsoft.sqlserver.jdbc.SQLServerException:
             The server version is not supported.
             The target server must be SQL Server 2000 or later.
       )
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:168)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)

      

Below is the configuration:

  • OS: Windows Server 2012
  • SQL Server 2014
  • JAVA version: JDK5u11 and JDK6u24
  • Jar file: sqljdbc.jar for JDK5 and sqljdbc4.jar for JDK6
+3


source to share


2 answers


You will need to update your SQL Server JDBC driver to version 4.0 (download here ). Then you can use versions of it

  • sqljdbc.jar for Java 5 and
  • sqljdbc4.jar for Java 6


to access SQL Server 2014.

+2


source


We dropped sqljdnc4.jar

and used jtds jar

and everything works like a charm.



0


source







All Articles