Cannot Connect From A Zos Machine To Oracle Installed On Windows (Doc ID 1362378.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version: and later   [Release: 11.2 and later ]
Information in this document applies to any platform.


On : version, Thin JDBC driver

Having a simple JDBC program to test getting a connection generated the next error.
The problem happens using ojdbc6.jar from 11.2. The URL specifies the thin driver.

- When the program is run on Windows, it works fine.
- When the program is run on IBM zOS machine, it generated this error stack:
- When using it works fine also.

java.sql.SQLException: Internal - Unexpected value
at oracle.jdbc.driver.T4CTTIoauthenticate.processRPA(
at oracle.jdbc.driver.T4CTTIfun.receive(
at oracle.jdbc.driver.T4CTTIfun.doRPC(
at oracle.jdbc.driver.T4CTTIoauthenticate.doOSESSKEY(
at oracle.jdbc.driver.T4CConnection.logon(
at oracle.jdbc.driver.PhysicalConnection.<init>(
at oracle.jdbc.driver.T4CConnection.<init>(
at oracle.jdbc.driver.T4CDriverExtension.getConnection(
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at TestOracle.getOracleConnectionFromCPDataSource(
at TestOracle.main(

The issue can be reproduced at will with the following steps:

1) The java program I am using is just a standard test connection

import java.sql.Connection;
import java.sql.DatabaseMetaData;

public class TestOracle {

public static void main(String[] args) {

for (String arg : args) {

String serverName = args[0];
String databaseName = args[1];
String userName = args[2];
String password = args[3];
int port = new Integer(args[4]);

try {
Connection conn = getOracleConnectionFromCPDataSource(serverName,
databaseName, userName, password, port);
System.out.println("Connection is " + conn);
} catch (Exception e) {

public static Connection getOracleConnectionFromCPDataSource(
String serverName, String databaseName, String userName,
String password, int port) throws Exception {
oracle.jdbc.pool.OracleConnectionPoolDataSource ds = new oracle.jdbc.pool.OracleConnectionPoolDataSource();

String urlValue = "jdbc:oracle:thin:" + userName + "/" + password + "@"
+ serverName + ":" + port + ":" + databaseName;
.println("Attempting to establish Oracle connection using URL DB**"
+ urlValue + "**");
System.out.println("URL: " + ds.getURL());

Connection conn = ds.getConnection();
DatabaseMetaData metadata = conn.getMetaData();
System.out.println("Database is **"
+ metadata.getDatabaseProductVersion() + "** and driver is **"
+ metadata.getDriverVersion() + "**");

System.out.println("got CP Connection!");
return conn;

2) Oracle authentication

3) java -cp .:ojdbc6.jar TestOracle host servicename userid password port


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