JDBC URL With Service Name Is Not Accepted (Doc ID 832455.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version 8.1.7.0 and later
Oracle Containers for J2EE - Version 9.0.4.0.0 to 10.1.3.5.0 [Release AS10g to AS10gR3]
Information in this document applies to any platform.
***Checked for relevance on 27-Jan-2014***

Symptoms

Changing a datasource URL from

jdbc:oracle:thin:user/password@host:1521:sid

to

jdbc:oracle:thin:user/password@host:1521/servicename

fails with error:

Unable to establish connection to "A1".
Error message: Exception occurred testing native data source connection.
Exception: 'java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid" '.

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