ORA-03106: 批量更新中致命的双任务通信协议错误

ORA-03106: fatal two-task communication protocol error in batch update

我有一个合并查询,其中一列的类型是 CLOB

PreparedStatement pstmt = conn.prepareStatement("MERGE..");    
for(List) {
//Update part
...
ByteArrayInputStream inputStream2 = new ByteArrayInputStream(model.getDescription().getBytes());
InputStreamReader inputStreamReader2 = new InputStreamReader(inputStream2);
pstmt.setClob(i++, inputStreamReader2); 
//Insert
..
ByteArrayInputStream inputStream = new ByteArrayInputStream(model.getDescription().getBytes());
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
pstmt.setClob(i++, inputStreamReader);  

pstmt.addbatch() 
}
pstmt.executeBatch();

它在 executeBatch 行给我 java.sql.BatchUpdateException: ORA-03106: fatal two-task communication protocol 错误,但是当我设置 pstmt.setString(i++, "") 时它起作用了,这意味着这个异常是因为这 2 个 CLOB 设置。我犯了什么错误?

我解决了使用 clob = conn.createClob();不知道为什么我以前不使用它。