"java.sql.SQLRecoverableException: No more data to read from socket" is Thrown When End-to-end Metrics is Used (Doc ID 1081275.1)

Last updated on JUNE 02, 2017

Applies to:

JDBC - Version to [Release 11.2]
Information in this document applies to any platform.
***Checked for relevance on 14-Aug-2012***


You receive the following exception when you invoke a callable statement (using END-TO-END metrics) for the second time:

java.sql.SQLRecoverableException: No more data to read from socket
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1200)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
at oracle.jdbc.driver.T4CCallableStatement.executeForDescribe(T4CCallableStatement.java:858)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
The above exception is seen with JDBC THIN

Code Sample:
OracleConnection c = (OracleConnection)ods.getConnection ();
String metrics[] = new String[OracleConnection.END_TO_END_STATE_INDEX_MAX];
// Where PACKAGE_NAME is the first component of the procedure name from the adaptor config.
// Eg.
// <Procedure ID="getCurrencies">
// <Name>PK_CORE_FRAMEWORKS.pr_get_currencies</Name>
// Procedures don't necessarily need to be in a package so the first component is optional.
// If package is not specified, the module should just be the schema.
// Schema is the username from the config file.

// Where PROCEDURE_NAME is the second component of the procedure name from the adaptor config.
// PROCEDURE_NAME is mandatory.
metrics[OracleConnection.END_TO_END_ACTION_INDEX] = "PR_GET_CURRENCIES";
c.setEndToEndMetrics(metrics, (short) 0);
OracleCallableStatement collStm = c.prepareCall(sql);  
collStm.execute(); // 1st call

metrics[OracleConnection.END_TO_END_ACTION_INDEX] = "PR_GET_LEDGER_TYPES";

c.setEndToEndMetrics(metrics, (short) 0);
collStm= c.prepareCall(sql);
collStm.execute();   //  <-- 2nd call where the error will be raised -->


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