1

I'm integrating DataNucleus with BoneCP-0.8.0-rc2 and I'm getting this exception, randomly:

javax.jdo.JDODataStoreException: No operations allowed after connection closed.
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:421)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:230)

After reading this post, I have set

  • datanucleus.connectionPool.maxConnectionAgeInSeconds = 170 (seconds)

Other properties that I use:

  • datanucleus.connectionPool.minPoolSize=0
  • datanucleus.connectionPool.maxPoolSize=8

The local MySQL server where I tested this property has wait_timeout=28800 (seconds).

Since I added this new property, I'm getting the above exception more often than before.

Since the exception doesn't explicitly specify that the connection is closed by the driver, I assume it was closed by the connection manager.

Do you have any other clue what might cause this exception?

Community
  • 1
  • 1
  • You should be using the idleConnection and friends and let the pool close off connections when not in need rather than maxConnectionAge – wwadge Sep 12 '13 at 13:48
  • Seems that reverting to boneCP 0.7.1, this exception is not thrown any more. The problem is not I get `WARN [com.jolbox.bonecp.ConnectionPartition] - BoneCP detected an unclosed connection and will now attempt to close it for you. You should be closing this connection in your application - enable connectionWatch for additional debugging assistance. ERROR [com.jolbox.bonecp.ConnectionPartition] - Error while closing off internal db connection com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.` – user1281432 Sep 19 '13 at 15:17

0 Answers0