My Oracle Support Banner

Hang When Executing a Batch Which is Made of Two Prepared Clob Inserts (Doc ID 302803.1)

Last updated on FEBRUARY 26, 2019

Applies to:

JDBC - Version 9.2.0.6 to 10.1.0.4 [Release 9.2 to 10.1]
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

An application using the oracle JDBC thin driver, version 10.1.0.3 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.addBatch();
stmt.setCharacterStream(1, createClobData(4001, 'b'), 4001);
stmt.addBatch();
stmt.executeBatch();
...

 

 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)

 

Changes

 

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