htdebeer opened a new pull request, #745:
URL: https://github.com/apache/tomcat/pull/745

   When invoking a method on a proxied statement returns `null`, that 
statement's proxy should also return `null`.
   
   In particular, `Statement#getResultSet` should not return a `ResultSetProxy` 
when the proxied statement returns `null`. Otherwise, that `ResultSet` proxy 
has a `null` delegate and calling methods on the proxy that lead to calling 
methods on the delegate could result in a `SqlException` with message 
"ResultSet closed."
   
   We found this issue because our Spring + MyBatis application started 
throwing `SqlException`s when calling stored procedures after upgrading to 
Tomcat v. 10.1.28, whereas it didn't in version 10.1.26.
   
   Looking in the MyBatis code, it checks if a `Statement`'s `ResultSet` is 
`null` or not. If it isn't, and it isn't when the `ResultSet` is proxied with a 
`null` delegate`, it later calls method `ResultSet#getMetaData()`. And that now 
responds with `SqlException` with message "ResultSet closed.".
   
   I think the new behavior was introduced in 
https://github.com/apache/tomcat/pull/742.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to