1
votes

I have an error in log after when trying to update the database:

java.sql.SQLException: Streaming result set null is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.

I dont understand how a null ResultSet can be active. it looks like the connection is in a wiered state.

1
It seems that the solution is to set clobberStreamingResults to true for the connection. - oshai

1 Answers

1
votes

Weird? No. It looks like you aren't closing your JDBC resources.

You should close Connection, Statement, and ResultSet in a finally block in the scope of the method that created them.

update the database...result sets are open and in use on a given connection

You cannot reuse a PreparedStatement that's a SELECT at one point and an UPDATE at another without closing in between.