"java.sql.SQLRecoverableException: No more data to read from socket" Using Application Continuity with 12c JDBC Driver (Doc ID 2140406.1)

Last updated on MAY 20, 2016

Applies to:

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

Symptoms

Configuration to use Application Continuity in a JDBC 12.1.0.2 application that uses a RAC database is attempted. If the program is in the middle of a transaction when a RAC instance fails, it is expected the application to be automatically reconnected to the other instance and replay the transaction automatically. The understanding is that this is possible when using Oracle Database 12c and the 12c JDBC driver as described in the Database JDBC Developer's Guide" (12c) Chapter 27 Application Continuity for Java.

Steps to reproduce:
A RAC service is created as is described in the documentation above, and a small Java program has been written to test application connectivity (attached).
The program increments a value in a table, sleeps, increments it again, sleeps, etc.
When the instance that the program is connected to is shut down, it is expected for the application to automatically connect to the other instance and continue. However, the program fails with error: "java.sql.SQLRecoverableException: No more data to read from socket".

For troubleshooting, the steps in <Document 1602233.1> - "How To Test Application Continuity Using A Standalone Java Program" were followed, and Application Continuity works just fine. However,the example in this document is not actually updating any data. In the program of interest, it is.


ERROR
-----------------------
java.sql.SQLRecoverableException: No more data to read from socket


Cause

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