My Oracle Support Banner

19c JDBC Connections Fail With 'Invalid number format for port number' When SID Contains Hyphen (Doc ID 2735252.1)

Last updated on MARCH 27, 2023

Applies to:

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

Symptoms

When using the 19.3 JDBC driver, attempted to connect to a database where the 3rd parameter (for SID or service name) involves a hyphen fails with the following exception:

oracle.net.ns.NetException: Invalid number format for port number


The same operation is successful when using the 18.3 JDBC driver.

An example of a failing JDBC URL/connect string:

jdbc:oracle:thin:@<HOST>:<PORT>:<SID>

Changes

 

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
References


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