6

In Java 8 the JDBC-ODBC-Bridge will be removed. The typical error is:

java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver

Do you know of a possible replacement? I found Easysoft. But this bridge required an additional server which not run inside the Java VM. It is a type 3 driver and not a type 1 driver. Are there other alternatives?

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
  • 1
    Which DB server do you access with ODBC. Maybe you find a direct/native JDBC-Driver. – Kai Huppmann Nov 13 '12 at 09:31
  • It is for a wide range of ODBC drivers which have no JDBC equivalent. – Horcrux7 Nov 13 '12 at 09:40
  • 1
    IDS Software / IDS Server is also a type 3 solution, but I believe it hasn't been actively developed for the last 5 or 6 years. – Mark Rotteveel Nov 13 '12 at 11:41
  • If anyone is looking for an alternative to the JDBC-ODBC Bridge for manipulating Microsoft Access databases, see the related question [here](http://stackoverflow.com/q/21955256/2144390). – Gord Thompson May 17 '14 at 11:06
  • My employer, OpenLink Software, makes a [Type 1 solution](http://uda.openlinksw.com/jdbc-odbc-st/). It's fully compatible with Java 8, etc. – TallTed Aug 19 '15 at 18:30
  • You can use jdbc odbc classes from jre7 also in jre8 - see stackoverflow.com/a/34617075/2110961 – Frank M. Jan 11 '16 at 15:27

2 Answers2

4

Another solution is to take the ODBC stuff from the 1.7 JRE and package it up into it's own JAR file.

To do so (this is for Windows 64 but the process should be the same), you'll need to grab the JdbcOdbc.dll out of the 1.7 JRE bin and copy it into the 1.8 JRE bin.

Next, extract the contents of the 1.7 JRE's lib\rt.jar into another location. Once extracted, delete everything except

sun\
    jdbc\
        odbc\
            *
    security\
        action\
            LoadLibraryAction.class 

Then create a JAR file with the remaining contents (the root contents of the JAR should be META-INF and sun). Copy the JAR file into the 1.8 JRE's lib\ext folder.

BStruthers
  • 958
  • 6
  • 8
-1

In the meantime we have written our own JDBC-ODBC-Bridge based on JNA for our reporting software i-net Clear-Reports. Currently the driver is not an official product. But if you have interest then you can contact us.

Horcrux7
  • 23,758
  • 21
  • 98
  • 156