My Oracle Support Banner

IO Error: Undefined Error When Connecting Ffrom a z/OS client Machine with JDBC (Doc ID 2723619.1)

Last updated on AUGUST 30, 2023

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 the Oracle database from a z/OS client machine using JDBC 12.2.0.1 and JDK 1.8, the following error is received:


java.sql.SQLRecoverableException: IO Error: Undefined Error
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:774)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
at java.sql.DriverManager.getConnection(DriverManager.java:675)
at java.sql.DriverManager.getConnection(DriverManager.java:258)
...
Caused by: oracle.net.ns.NetException: Undefined Error
at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:271)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:317)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1438)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:518)
... 7 more

 

Testing the same connection with JDBC 19.7 reporte the exception:


java.sql.SQLRecoverableException: IO Error: Invalid connection string format, a valid format is: "host:port:sid"
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:858)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
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.DriverManager.getConnection(DriverManager.java:675)
at java.sql.DriverManager.getConnection(DriverManager.java:258)
...
Caused by: oracle.net.ns.NetException: Invalid connection string format, a valid format is: "host:port:sid"
at oracle.net.resolver.AddrResolution.resolveSimple(AddrResolution.java:631)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:519)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:682)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:661)
at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:202)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:340)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1600)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:591)
... 8 more

 

Set encoding to UTF-8 by setting the java directive -Dfile.encoding=UTF-8 to run the application does not resolve the issue.

 

ERROR
-----------------------
oracle.net.ns.NetException: Undefined Error



STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Connect to the database from z/OS using JDBC
2. Error is received.



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
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.