sun.jdbc.odbc.JdbcOdbcDriver不使用jdk 1.8 [英] sun.jdbc.odbc.JdbcOdbcDriver not working with jdk 1.8

查看:966
本文介绍了sun.jdbc.odbc.JdbcOdbcDriver不使用jdk 1.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了jdk8u40,现在我得到:

I downloaded jdk8u40 and now I get:

SQLException:
SQLState: 08001
Message:  No suitable driver found for jdbc:odbc:mysqlDB
Vendor:   0

其中mysqlDB是我的数据源名称。

where mysqlDB is my data source name.

我使用:

jdbc.drivers=sun.jdbc.odbc.JdbcOdbcDriver
jdbc.url=jdbc:odbc:mysqlDB

as连接字符串。我已经下载并安装了驱动程序:

as connection strings. I have downloaded and installed driver:


mysql-connector-odbc-5.3.4-winx64.msi

mysql-connector-odbc-5.3.4-winx64.msi

我在你的论坛中读到jdk 1.8不再支持jdbc-odbc桥。
任何帮助表示感谢。

I read in your forums that the jdbc-odbc bridge is no longer supported in jdk 1.8. Any help appreciated.

推荐答案

JDBC-ODBC桥是 JDK 8不再提供/支持,因此错误:

The JDBC-ODBC bridge is no longer shipped/supported with JDK 8, hence the errors:


JDBC-ODBC Bridge应被视为过渡解决方案;它将在JDK 8中删除。此外,Oracle不支持JDBC-ODBC Bridge。 Oracle建议您使用数据库供应商提供的JDBC驱动程序而不是JDBC-ODBC Bridge。

The JDBC-ODBC Bridge should be considered a transitional solution; it will be removed in JDK 8. In addition, Oracle does not support the JDBC-ODBC Bridge. Oracle recommends that you use JDBC drivers provided by the vendor of your database instead of the JDBC-ODBC Bridge.

如果您正在使用Java,最好使用JDBC驱动程序而不是ODBC驱动程序,请参见 http:/ /dev.mysql.com/downloads/connector/j/ 用于MySQL JDBC驱动程序。

If you're using Java, it would be better to use a JDBC driver instead of an ODBC driver, see here http://dev.mysql.com/downloads/connector/j/ for the MySQL JDBC driver.

这篇关于sun.jdbc.odbc.JdbcOdbcDriver不使用jdk 1.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆