https://bz.apache.org/bugzilla/show_bug.cgi?id=63995
Bug ID: 63995
Summary: Statements are not closed when a JDBC connection is
passivated in tomcat-dbcp
Product: Tomcat 8
Version: 8.5.49
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ----
Web-application opens connection from JNDI pool, creates PreparedStatements,
closes connection without closing statements.
Statements are kept open and
"ORA-01000: maximum open cursors exceeded" error is thrown.
Pool is expected to close statements on connection close.
The problem seems to be in
src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java, ported from
DBCP2.
Tomcat version (but not dbcp2 version) contains following code:
https://github.com/apache/tomcat/blob/master/java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java#L624
protected void passivate() throws SQLException {
...
if (traces != null && traces.isEmpty()) {
^^^^^^^^^^^^^^^^
In DBCP2 version this line has ! before isEmpty():
https://github.com/apache/commons-dbcp/blob/master/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java#L624
if (traces != null && !traces.isEmpty()) {
^^^
--
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]