I am trying to retrieve thexml from oracle db and then trying to insert the same xml into the Oracle Database different table. The select via clob is working fine but its throwing an error while updation.
java.sql.Clob myClob = null;
connect = DriverManager.getConnection(str2, str3, str4);
String sql = "select xml from table1 where id='3|32'";
stmt = connect.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
myClob = rs.getClob("XML"); // This part is working fine.
//Updation
connect1 = DriverManager.getConnection(str22, str33, str44);
String query1 = "update documentsout set xml = ? " +
"where id = ? ";
stmt1 = connect1.prepareStatement(query1);
stmt1.setString(1, myClob); // Inserting the same CLOB
stmt1.setString(2, id);
stmt1.executeUpdate(); // ERROR HERE
The error is
java.sql.SQLException: ORA-00600: internal error code, arguments: [kglgtbo1], [0x700000482AA4608], [], [], [], [], [], [], [], [], [], []
Can you please help?
.setString()&.setClob()- neither working for me.