I’m getting this BatchUpdateException from a stmt.executeBatch() statement:
BatchUpdateException: A resultset was created for update
The internet does not have any information on this exception message. What does it mean? The traceback doesn’t contain anything useful other than that a stored procedure failed.
I’d interpret the message as meaning that an SQL statement that you added via
addBatch()has produced aResultSet, meaning that it’s not your normalINSERT,UPDATEorDELETEstatement.Statements that should return results can’t be executed in batches with JDBC.
The JDBC Tutorial (under the heading “Handling Batch Update Exceptions”) confirms it:
You seem to be running into case 1 here.