JDBC Connection to RAC Database Fails With "Unknown host specified" (Doc ID 1060941.1)

Last updated on MARCH 08, 2017

Applies to:

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

Symptoms


Trying to connect to an Oracle 10.2.0.4 RAC database using JDBC Thin 10.2.0.3 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))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <service name>)))

Connecting to the database...Connecting...

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




Connection from sqlplus works successfully.

Cause

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