You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2019/12/09 15:22:30 UTC
[Bug 63995] New: Statements are not closed when a JDBC connection is
passivated in tomcat-dbcp
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: dev@tomcat.apache.org
Reporter: stem@iname.com
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 63995] Statements are not closed when a JDBC connection is
passivated in tomcat-dbcp
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63995
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
OS| |All
Status|NEW |RESOLVED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report and the analysis. I did a line by line diff of the entire
fork and found one additional issue as well.
Fixed in:
- master for 9.0.31 onwards
- 8.5.x for 8.5.51 onwards
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org