[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 Filip Hanik changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #21 from Filip Hanik --- Fixed in r1617042 Danila, Thank You So Much for the review Filip -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 Danila Galimov changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #20 from Danila Galimov --- Filip, You changed the logic a bit. In my original patch, only the statements, which are not closed, are logged. if (!st.isClosed()) { if (logCreationStack) { log.warn("Statement created, but was not closed ", se.getAllocationStack()); } } However, in your core, http://svn.apache.org/viewvc?view=revision&revision=1616644, you always log the creation stack on closure, even if it was already closed. My intention was to log only unclosed statements. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #19 from Filip Hanik --- (In reply to Michael Osipov from comment #18) > The revision links to Apache Directory r1616644 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #18 from Michael Osipov <1983-01...@gmx.net> --- The revision links to Apache Directory -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 Filip Hanik changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #17 from Filip Hanik --- Fixed in r161644 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #16 from Danila Galimov --- Is it ok to apply it? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 Filip Hanik changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #15 from Filip Hanik --- Reopening since the patch is a new fix -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #14 from Danila Galimov --- The other changes are: 1) Removed catch of ClassCastException, since it shouldn't occur (And I was not able to get it actually in my tests) 2) Statement is now closed only if Statement.isClosed() returns false. I think there is no sense of closing already closed statement. In my tests all of the cursors were closed with this settings -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #13 from Christopher Schultz --- (In reply to Danila Galimov from comment #12) > When logAbandoned is set to true, when connection is closed, but any > statements are left unclosed, you'll get this message in the catalina.log > and/or console (depends on the logger configuration): > > WARNING: Statement created, but was not closed That's the general ideal, right? How does your patch do anything differently? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #12 from Danila Galimov --- When logAbandoned is set to true, when connection is closed, but any statements are left unclosed, you'll get this message in the catalina.log and/or console (depends on the logger configuration): WARNING: Statement created, but was not closed java.lang.Throwable at org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer$StatementEntry.(StatementFinalizer.java:98) at org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer.createStatement(StatementFinalizer.java:46) at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:69) at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) at org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153) at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) at org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41) at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80) at com.sun.proxy.$Proxy14.prepareCall(Unknown Source) at com.exigen.cm.database.ConnectionProviderImpl.findDialect(ConnectionProviderImpl.java:258) at com.exigen.cm.database.ConnectionProviderImpl.configure(ConnectionProviderImpl.java:191) at com.exigen.cm.impl.RepositoryConfiguration.checkFillConfiguration(RepositoryConfiguration.java:375) at com.exigen.cm.impl.RepositoryConfiguration.getRepositoryConfiguration(RepositoryConfiguration.java:238) at com.exigen.cm.impl.RepositoryProviderImpl.getRepository(RepositoryProviderImpl.java:42) at com.exigen.cm.impl.spring.LocalExigenJcrRepositoryBean.getObject(LocalExigenJcrRepositoryBean.java:74) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFact
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #11 from Christopher Schultz --- (In reply to Danila Galimov from comment #10) > I've created an patch for StatementFinalizer class. It allows to print the > creation stack, if configured in a way like > jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor. > StatementFinalizer(logCreationStack=true)". Otherwise, it works almost the > same way as original version. > I think it may be useful to detect unclosed statements in the code. Please > integrate it. How is this different than setting logAbandoned="true"? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #10 from Danila Galimov --- I've created an patch for StatementFinalizer class. It allows to print the creation stack, if configured in a way like jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer(logCreationStack=true)". Otherwise, it works almost the same way as original version. I think it may be useful to detect unclosed statements in the code. Please integrate it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #9 from Danila Galimov --- Created attachment 31467 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31467&action=edit StatementFinalizer patch -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #8 from Filip Hanik --- (In reply to Danila Galimov from comment #7) > Thank you :-) > > Ideally I would like to have something like stacktrace of statement opening, > and stacktrace of connection close, so when connection is closed, all of the > opened and not closed prepared statments, connections, result sets e.t.c > will be printed with creation trace, so I will be able to check this. > > Is it possible to do with currently available jdbc interceptors (or maybe I > need to setup something like proxy jdbc drivers) ? > > Unfortunately the project is very big and we're using a lot of libraries, so > it's hard to get the exact place without logging. Writing your own is very simple, take a look at the code for the StatementFinalizer http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java?view=markup And you can easily add in options to track stack traces. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #7 from Danila Galimov --- Thank you :-) Ideally I would like to have something like stacktrace of statement opening, and stacktrace of connection close, so when connection is closed, all of the opened and not closed prepared statments, connections, result sets e.t.c will be printed with creation trace, so I will be able to check this. Is it possible to do with currently available jdbc interceptors (or maybe I need to setup something like proxy jdbc drivers) ? Unfortunately the project is very big and we're using a lot of libraries, so it's hard to get the exact place without logging. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #6 from Christopher Schultz --- If the StatementFinalizer fixed your problem, then you should take some time to look into your application and correct those errors. Head over to the users' mailing list if you'd like some help with that. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 Danila Galimov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from Danila Galimov --- Yes, it helped. Thanks. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #4 from Filip Hanik --- Not sure this would be a bug. It is your responsibility to close statements in your application. However, you can configure the pool to do it for you https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer in your config that would look like jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState; org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer" -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #3 from Danila Galimov --- No, could you please clarify how can I do that? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #2 from Christopher Schultz --- Have you enabled "abandoned" logging? I believe tomcat-pool is less kind than DBCP when you have resource leaks in your application. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 Mark Thomas changed: What|Removed |Added Component|Catalina|jdbc-pool Version|7.0.50 |unspecified Product|Tomcat 7|Tomcat Modules OS||All --- Comment #1 from Mark Thomas --- Correct product -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org