My Oracle Support Banner

"Failed to connect to database java.lang.IllegalArgumentException: serviceName is null" With JDBC Connections (Doc ID 2765989.1)

Last updated on MARCH 29, 2024

Applies to:

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


When trying to connect to an Oracle database with JDBC connection URL, it fails with: Failed to connect to database java.lang.IllegalArgumentException: serviceName is null.

[INFO ] 2021-02-19 19:23:19,220 JdbcTest.loadProperties() - Finished loading properties for file:
Feb 19, 2021 7:23:19 PM oracle.simplefan.impl.FanManager subscribe
SEVERE: attempt to create FanSubscription with null serviceName
Exception in thread "main" java.lang.IllegalArgumentException: serviceName is null
at oracle.simplefan.impl.FanManager.subscribe(
at oracle.jdbc.driver.HAManager.addService(
at oracle.jdbc.driver.HAManager.addConnection(
at oracle.jdbc.driver.HAManager.enableHAIfNecessary(
at oracle.jdbc.driver.PhysicalConnection.connect(
at oracle.jdbc.driver.T4CDriverExtension.getConnection(
at oracle.jdbc.driver.OracleDriver.connect(
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql/java.sql.DriverManager.getConnection(
at java.sql/java.sql.DriverManager.getConnection(



The connection is working on JDBC lower environments with OJDBC6 and JDBC version

After the JDBC upgrade to, the error is seen.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.