Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tomcat, JOTM and MYSQL - Generic Pool Cleanup

843854Apr 11 2005 — edited Apr 12 2005
I am experiencing problems with Tomcat 5 and MySQL and JOTM.

When I run tomcat using the org.objectweb.jndi.DataSourceFactory Factory everything runs fine, but if I leave the application for 10 minutes, the GenericPool.cleanup occurs and seems to cleanup my connections with fatal consequences :

2005-04-11 09:24:45,398 xapool INFO - GenericPool:cleanUp less than minSize obje
cts in the pool min=2 max=50 count=0
2005-04-11 09:24:45,438 xapool INFO - GenericPool:cleanUp done min=2 max=50 coun
t=2
2005-04-11 09:25:47,638 xapool ERROR - StandardXADataSource:getFreeConnection ER
ROR: Failed while autocommiting a connection: java.sql.SQLException: No operatio
ns allowed after connection closed.

Connection was closed explicitly by the application at the following location:

** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
at com.mysql.jdbc.Connection.close(Connection.java:1119)
at org.enhydra.jdbc.standard.StandardXAConnection.close(StandardXAConnec
tion.java:150)
at org.enhydra.jdbc.pool.StandardPoolDataSource.expire(StandardPoolDataS
ource.java:235)
at org.enhydra.jdbc.pool.GenericPool.removeUnlockedObject(GenericPool.ja
va:346)
at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:545)
at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:53)
at java.lang.Thread.run(Thread.java:534)


** END NESTED EXCEPTION **


Mon Apr 11 09:25:47: Error : SQL error on statement select * from test_table where id = ?
Mon Apr 11 09:25:47: Error : No operations allowed after connection closed.

Connection was closed explicitly by the application at the following location:

** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
at com.mysql.jdbc.Connection.close(Connection.java:1119)
at org.enhydra.jdbc.standard.StandardXAConnection.close(StandardXAConnec
tion.java:150)
at org.enhydra.jdbc.pool.StandardPoolDataSource.expire(StandardPoolDataS
ource.java:235)
at org.enhydra.jdbc.pool.GenericPool.removeUnlockedObject(GenericPool.ja
va:346)
at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:545)
at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:53)
at java.lang.Thread.run(Thread.java:534)


** END NESTED EXCEPTION **


Mon Apr 11 09:25:47: Error : SQL error on statement select * from test_table
where id_1 = ?
Mon Apr 11 09:25:47: Error : No operations allowed after connection closed.

Connection was closed explicitly by the application at the following location:

** BEGIN NESTED EXCEPTION **

java.lang.Throwable

STACKTRACE:

java.lang.Throwable
at com.mysql.jdbc.Connection.close(Connection.java:1119)
at org.enhydra.jdbc.standard.StandardXAConnection.close(StandardXAConnec
tion.java:150)
at org.enhydra.jdbc.pool.StandardPoolDataSource.expire(StandardPoolDataS
ource.java:235)
at org.enhydra.jdbc.pool.GenericPool.removeUnlockedObject(GenericPool.ja
va:346)
at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:545)
at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:53)
at java.lang.Thread.run(Thread.java:534)


** END NESTED EXCEPTION **


2005-04-11 09:34:45,441 xapool INFO - GenericPool:cleanUp less than minSize obje
cts in the pool min=2 max=50 count=1
2005-04-11 09:34:45,451 xapool INFO - GenericPool:cleanUp done min=2 max=50 coun
t=2

It seems that the connection expires and is never cleared from the pool. Is there a way to stop the connections from expiring?

The application never creates a new connection after this has occured.

I am using:

mysql-connector-java-3.0.15-ga-bin
XAPool 1.3.1
JOTM 1.4.3


Any Help would be apprecitated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2005
Added on Apr 11 2005
2 comments
2,714 views