Error Message: Connection failed: java.net.UnknownHostException: ODBC
Usually seen in a large block of Java error text, such as this --
java.sql.SQLException: [OpenLink][OPLJDBC3]Connection failed: java.net.UnknownHostException: ODBC at openlink.jdbc3.OPLMessage.makeException(Unknown Source) at openlink.jdbc3.Driver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source)
This message typically means our Type 3 Driver has been loaded instead of our Type 1 Driver.
You should generally have only one of the above drivers included in your CLASSPATH
environment
variable.
Choose the one best matched to your active JVM, and supporting the connection Type, 1 or 3, you require.
Our Type 1 JDBC Drivers have the following attributes --
Filename | Classname | JDBC Version | Compatible JVMs |
---|---|---|---|
opljdbc.jar |
openlink.jdbc.Driver |
JDBC 1 | 1.1.x |
opljdbc2.jar |
openlink.jdbc2.Driver |
JDBC 2 | 1.2.x and 1.3.x |
opljdbc3.jar |
openlink.jdbc3.Driver |
JDBC 3 | 1.4.x and 1.5.x |
opljdbc4.jar |
openlink.jdbc4.Driver |
JDBC 4 | 1.6.x |
opljdbc4_1.jar |
openlink.jdbc4.Driver |
JDBC 4.1 | 1.7.x |
opljdbc4_2.jar |
openlink.jdbc4.Driver |
JDBC 4.2 | 1.8.x |
Our pure Type 3 JDBC Drivers have the following attributes --
Filename | Classname | JDBC Version | Compatible JVMs |
---|---|---|---|
megathin.jar |
openlink.jdbc.Driver |
JDBC 1 | 1.1.x |
megathin2.jar |
openlink.jdbc2.Driver |
JDBC 2 | 1.2.x and 1.3.x |
megathin3.jar |
openlink.jdbc3.Driver |
JDBC 3 | 1.4.x and 1.5.x |
megathin4.jar |
openlink.jdbc4.Driver |
JDBC 4 | 1.6.x |
megathin4_1.jar |
openlink.jdbc4.Driver |
JDBC 4.1 | 1.7.x |
megathin4_2.jar |
openlink.jdbc4.Driver |
JDBC 4.2 | 1.8.x |
The pure Type 3 JDBC Drivers cannot be used for Type 1 connections.
The Type 1 Drivers are produced as hybrids, and may also be used for Type 3 connections.
Evidence
-
CLASSPATH
environment variable
Referenced by...