I run an application on Tomcat7 with c3p0 as the datasource pooling manager. I added a connection customizer to log each datasource Acquired/check out/in.
My log (catalina.out) contains a number of entries thus:
Acquired com.cloudera.impala.jdbc41.ImpalaJDBC41Connection@e5059be [z8kfsx9f16wfz9m1p2ghf4|729e8277] Acquired com.cloudera.impala.jdbc41.ImpalaJDBC41Connection@217a2a9 [z8kfsx9f16wfz9m1p2ghf4|729e8277] Checking in com.cloudera.impala.jdbc41.ImpalaJDBC41Connection@e5059be Checked out com.cloudera.impala.jdbc41.ImpalaJDBC41Connection@e5059be
I also noticed a number of sql exceptions like:
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@6c5ca37c at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:571) at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470) at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
When I search the log file for “6c5ca37c”, I don’t see any line(s) that indicates when the connection was ever acquired. Parsing the log shows me that ALL connections that were “Acquired” where “Destroyed” successfully but all the connections that show up with the sql exception do not have any corresponding Acquired line
Any insight will be helpful.