ClassNotFoundException when trying to connect to .accdb file via JDBC-ODBC in Java 8

送分小仙女□ 提交于 2019-11-28 12:47:02

According to this post the JDBC-ODBC Bridge was removed in Java8. You can use a JDBC Driver specifically for Access. I see a lot of people mentioning UCanAccess to connect to Access although I have not used it myself.

According to Oracle the JDBC-ODBC Bridge will no longer be included with JDK as of Java SE 8 and that

The ideal is "Pure Java": no native code, no platform dependent features.

that means looking for at least a JDBC type 3 or 4.

Lance Andersen wrote:

The JDBC-ODBC Bridge has always been considered transitional and a non-supported product that was only provided with select JDK bundles and not included with the JRE.

The JDBC-ODBC bridge provides limited support for JDBC 2.0 and does not support more recent versions of the JDBC specification.

You should either use any of third-part database drivers (as Microsoft doesn't provide for any) or use a previous version of java. Anyhow I suggest using a specific Driver, instead of the JDBC-ODBC one.

For that you could look at any of the following:

Oracle's (and Sun's) official position has long (since JDBC 1.0!) been that --

the [JVM-bundled] JDBC-ODBC Bridge should be considered a transitional solution [...] Oracle [was Sun] does not support the JDBC-ODBC Bridge.

However, my employer, OpenLink Software, has produced enterprise-grade commercial Type 1 Bridges between JDBC and ODBC since JVM 1.0, and current versions are fully compatible with the current JVM 1.8. You can learn more here --

ODBC Bridge might not exist in JRE rather than SUN's. Check your JRE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!