Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.8.3.0, 10.9.1.0
-
None
-
None
-
Normal
-
Repro attached, Workaround attached
Description
The issue is specific to the DerbyNet client driver, and doesn't seem to occur using embedded Derby.
"PreparedStatement.setObject(int, Object, Types.CLOB)". It seems to be a problem updating a CLOB column with a parameterized value using the DerbyNet client driver, and if the update SQL ends up updating more than one row. I attached a simple test case that just uses JDBC to reproduce the error. The exception looks like this:
org.apache.derby.client.am.BatchUpdateException: Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getNextException() to retrieve the exceptions for specific batched elements.
at org.apache.derby.client.am.Agent.endBatchedReadChain(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.executeBatchRequestX(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.executeBatchX(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.executeBatch(Unknown Source)
...
Caused by: org.apache.derby.client.am.SqlException: Error for batch element #0: An unexpected exception was thrown
at org.apache.derby.client.am.Statement.completeExecute(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.readExecute(Unknown Source)
at org.apache.derby.client.net.StatementReply.readExecute(Unknown Source)
at org.apache.derby.client.net.NetPreparedStatement.readExecute_(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.readExecute(Unknown Source)
... 4 more
Caused by: org.apache.derby.client.am.SqlException: Error for batch element #0: Java exception: 'Stream has already been read and end-of-file reached and cannot be re-used.: java.io.EOFException'.
at org.apache.derby.client.am.SqlException.<init>(Unknown Source)
at org.apache.derby.client.am.SqlException.<init>(Unknown Source)
... 10 more
Attachments
Attachments
Issue Links
- is related to
-
DERBY-6237 PreparedStatement.execute() fails starting 10.2 when multiple rows are updated and PreparedStatement.setCharacterStream(int, Reader, int) is used
- Open
-
DERBY-6245 PreparedStatement.setString fails in client server case when the String size is 10923 or larger and PreparedStatement updates more than one row
- Open
- relates to
-
DERBY-6232 enhance ParameterMappingTest for setObject to test more than just insert
- Open