Bug 57460 - [DB2]Connection broken after few hours but not removed from the pool?
Summary: [DB2]Connection broken after few hours but not removed from the pool?
Status: NEW
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: Other Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2015-01-19 10:17 UTC by Loïc RODIER
Modified: 2015-01-19 10:17 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Loïc RODIER 2015-01-19 10:17:50 UTC

We encountered an error using tomcat.jdbc in acceptance.
This pool is used by default on TomEE Some application using DB2 had the issue after a night or at least some hours of inactivity.
Some broken connections seems to be in pool.
Changing the pool implementation to Common JDBC fix the problem.

I am not sure it is very interesting to solve issue on DB2 but maybe...

TomEE use Tomcat 7.0.53
The driver used is DataDirect 5.1.3
Here is the pool configuration is:

JdbcDriver com.merant.datadirect.jdbc.db2.DB2Driver
		JdbcUrl jdbc:datadirect:db2://ooooo:uuu;locationName=xxxx;packageCollection=JDBCV5R0
		UserName XXXXXX
		Password XXXXXX
		JtaManaged true
		InitialSize 3
		MaxActive 20
		MinIdle 3
		MaxIdle 10
		TestOnBorrow true
		testOnReturn true
		testWhileIdle true
		numTestsPerEvictionRun 1
		PoolPreparedStatements true
		MaxOpenPreparedStatements 128
		ValidationQuery select current date from sysibm.sysdummy1
		timeBetweenEvictionRunsMillis 100000

The stack trace is:

Caused by: java.sql.SQLException: [DataDirect][DB2 JDBC Driver]Object has been closed.
	at com.ddtek.jdbc.db2base.ddcf.b(Unknown Source)
	at com.ddtek.jdbc.db2base.ddcf.a(Unknown Source)
	at com.ddtek.jdbc.db2base.ddce.b(Unknown Source)
	at com.ddtek.jdbc.db2base.ddce.a(Unknown Source)
	at com.ddtek.jdbc.db2base.BaseConnection.rollback(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
	at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
	at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:71)
	at org.apache.tomcat.jdbc.pool.interceptor.StatementCache.invoke(StatementCache.java:180)
	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.$Proxy71.rollback(Unknown Source)
	at org.apache.openejb.resource.jdbc.managed.local.LocalXAResource.rollback(LocalXAResource.java:158)
	... 36 more