简体   繁体   English

SQL Server 2014的JDBC驱动程序

[英]JDBC driver for SQL server 2014

We have recently migrated to SQL server 2014 with JAVA 5 on one machine and JAVA 6 on another (this is a requirement). 我们最近迁移到SQL Server 2014,一台机器上安装了JAVA 5,另一台机器上安装了JAVA 6(这是一项要求)。 When I try to connect to database I get follwoing 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)

Following is the configuration: 以下是配置:

  • OS: Windows server 2012 操作系统:Windows Server 2012
  • SQL server 2014 SQL server 2014
  • JAVA version: JDK5u11 and JDK6u24 JAVA版本:JDK5u11和JDK6u24
  • Jar file: sqljdbc.jar for JDK5 and sqljdbc4.jar for JDK6 Jar文件:JDK5的sqljdbc.jar和JDK6的sqljdbc4.jar

You will need to upgrade your SQL Server JDBC driver to at least version 4.0 (download here ). 您需要将SQL Server JDBC驱动程序升级到至少4.0版( 此处下载)。 Then you can use its versions of 然后你可以使用它的版本

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

to access SQL Server 2014. 访问SQL Server 2014。

我们丢弃了sqljdnc4.jar并使用了jtds jar而且一切都像魅力一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM