https://bz.apache.org/bugzilla/show_bug.cgi?id=69279
Bug ID: 69279
Summary: Calling stored procedure via MyBatis now throws
SqlException with message "ResultSet closed."
Product: Tomcat 10
Version: 10.1.28
Hardware: PC
OS: Linux
Status: NEW
Severity: regression
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ------
When we updated Tomcat from 10.1.26 to 10.1.28, suddenly our Spring+MyBatis
application started throwing SqlExceptions when calling REST API endpoints that
would call stored procedures somewhere.
Looking in MyBatis code, the issue seems caused by calling method #getMetaData
on a proxies ResultSet with a null delegate. This now happens because when
calling a proxied CallableStatement's #getResultSet method responds with a
ResultSetProxy with a null delegate whereas before in version 10.1.26, it
responded with null.
MyBatis has a different behavior for when the method #getResultSet responds
with null versus when it responds with a non-null value. However, because the
non-null value it now returns is a ResultSetProxy with a null delegate, calling
methods on that non-null value results in a SqlException being thrown.
After executing a CallableStatement, its #getResultSet method responds with
null, and so should the proxied CallableStatement.
I've created a fix for this in https://github.com/apache/tomcat/pull/745
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]