JDBC Connection to RAC Database Fails With "Unknown host specified"

(Doc ID 1060941.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


Trying to connect to an Oracle RAC database using JDBC Thin fails with error:

>java -classpath .;.\ojdbc14.jar ConnectTest <user< <pwd> jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE = on)
(ADDRESS = (PROTOCOL = TCP)(HOST = <vip1>)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = <vip2>)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = <vip3>)(PORT = 1521))

Connecting to the database...Connecting...

Exception in thread "main" java.sql.SQLException: Io exception: Unknown host specified

Connection from sqlplus works successfully.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms