users@glassfish.java.net

Strange database closed exception

From: John Lister <john.lister_at_kickstone.com>
Date: Thu, 16 Aug 2012 07:18:34 +0100

Using glassfish v3.1.2 I repeatedly get the following exception:

Internal Exception: org.postgresql.util.PSQLException: Connection has been closed automatically because a new connection was opened for the same PooledConnection or the PooledConnection has been closed.
Error Code: 0
Call: select data,next from products.word_index_keys where index='book-7'
Query: DataReadQuery(sql="select data,next from products.word_index_keys where index='book-7'")
class org.eclipse.persistence.exceptions.DatabaseException

Now my code only accesses the db via the connection pool using entity managers and eclipselink, so I was wondering if anyone had any suggestions as to what or why the connections are being closed in the background while in use. I can provide additional info if required.

Thanks

John