在哪里指定OpenGTS用来访问SQL Server的jar文件(sqljdbc4.jar)

时间:2014-07-18 16:46:15

标签: java sql-server

我在使用Tomcat 7和Java 1.7的Windows 2012服务器上运行OpenGTS。我想使用SQL Server,因为我已经安装了这个。规范非常清楚如何更新common.conf以指向正确的sql server数据库。但是,当我运行checkinstall.bat(或OpenGTS的任何其他数据库工具)时,我得到一个例外:

 SEVERE: Java Runtime Environment (JRE) version 1.7 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
 Exception in thread "main" java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.7 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
     at com.microsoft.sqlserver.jdbc.SQLServerConnection.<init>(SQLServerConnection.java:304)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1011)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.opengts.dbtools.DBConnection.getConnection(DBConnection.java:659)
    at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:769)
    at org.opengts.dbtools.DBConnection._execute(DBConnection.java:856)
    at org.opengts.dbtools.DBConnection.execute(DBConnection.java:811)
    at org.opengts.dbtools.DBConnection.execute(DBConnection.java:793)
    at org.opengts.dbtools.DBFactory.tableExists(DBFactory.java:1648)
    at org.opengts.tools.CheckInstall.main(CheckInstall.java:2100)

我很确定我已经在包含jar文件的文件夹中删除或重命名sqljdbc.jar(可能重命名是不够的)。我没有看到任何配置文件指定这个。我通常不是Java开发人员,但我觉得我应该做一件简单的事情来“使用”我拥有的sqljdbc4.jar。我只是不知道那简单的事情是什么......任何帮助都会受到赞赏!

如果JRE 1.7不支持上面提到的“此”驱动程序的SEVERE警告,那肯定会有所帮助,或许更具体一些,让我知道驱动程序“这个”是什么......

1 个答案:

答案 0 :(得分:0)

精氨酸。这台机器上的JRE太多了!我发现我已经将文件重命名为lib \ ext中的另一个JRE文件夹,因此我完全删除了该sqljdbc.jar文件。现在它消失了。现在该计划有效。