Hang When Executing a Batch Which is Made of Two Prepared Clob Inserts

(Doc ID 302803.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version: to
This problem can occur on any platform.


An application using the oracle JDBC thin driver, version hangs when executing a batch which is made of two prepared inserts statement.

The two inserts statement in the batch just consists of inserting a clob (one clob < 4000, another one > 4000).

The sequence of code is the following:

String sql = "INSERT INTO test (aClob) VALUES (?)";
stmt = conn.prepareStatement(sql);
stmt.setCharacterStream(1, createClobData(3999, 'a'), 3999);
stmt.setCharacterStream(1, createClobData(4001, 'b'), 4001);

 The Java Stack Trace shows that it hangs when executing the batch.The application is waiting on a socket read:

at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java)


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