My Oracle Support Banner

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

Last updated on APRIL 06, 2021

Applies to:

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

Symptoms

When trying to connect to an Oracle database with JDBC 12.2.0.1 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: jdbc-test.properties
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(FanManager.java:140)
at oracle.jdbc.driver.HAManager.addService(HAManager.java:165)
at oracle.jdbc.driver.HAManager.addConnection(HAManager.java:224)
at oracle.jdbc.driver.HAManager.enableHAIfNecessary(HAManager.java:731)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:814)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)

 

Changes

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

After the JDBC upgrade to 12.2.0.1, the error is seen.

Cause

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
Symptoms
Changes
Cause
Solution


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