I'd interpret the message as meaning that an SQL statement that you added via addBatch()
has produced a ResultSet
, meaning that it's not your normal INSERT
, UPDATE
or DELETE
statement.
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 will get a BatchUpdateException when you call the method executeBatch if (1) one of the SQL statements you added to the batch produces a result set (usually a query) or (2) one of the SQL statements in the batch does not execute successfully for some other reason.
You seem to be running into case 1 here.
BatchUpdateException
, he seems to be seeing the other one (see my answer). – Gregorygregrory