When the HOMOGENEOUS_BATCH and ENABLE_LOB_LOCATORS properties are set to true, your client application cannot mix LOB and non-LOB prepared statement setter methods in the same batch.
String sql = "update members SET catchphrase = ? WHERE member_id = ?"; prep_stmt = connection.prepareStatement(sql); prep_stmt.setString(1, "Push the button, Frank!"); prep_stmt.setLong(2, 45129); prep_stmt.addBatch(); Clob myclob = con.createClob(); myclob.setString(1, "Hi-keeba!"); prep_stmt.setClob(1, myclob); prep_stmt.setLong(2, 45130); prep_stmt.addBatch(); pstmt.executeBatch();
where catchphrase is a column of type text. This code fails because the setString method and the setClob method are used in the same batch for the same column.