Issue #2123: Close() Method of EMF throwing "PersistenceException: Connection is closed" on first attempt to close.

Type: Bug ReoprtVersion: 2.6.9Priority: HighStatus: ClosedReplies: 1
#1

We encountered an issue that caused an outage last Friday on multiple ObjectDb server instances.
The problem occurred while trying to close the EMF to three separate ODB databases, residing on different ObjectDb Servers,  the exceptions were thrown on two of our servers (TransactionServers) that are clients of these ObjectDb Servers.   The TransactionServers were attempting to close the EntityManagerFactory associated with these ODBs by calling the EMF’s close() method.   The exception / stack trace below was thrown on the first attempt to close()  and on many attempts thereafter.  Can you please provide insight on why this exception occured, and why would it be experienced on three separated ObjectDb servers at the same time?


com.objectdb.o._PersistenceException: Connection is closed due to
UserException: Connection is closed
com.objectdb.o._PersistenceException:45
com.objectdb.o.JPE:145
com.objectdb.o.ERR:56
com.objectdb.o.OST:599
com.objectdb.o.OMF:980
com.objectdb.o.OMF:917
com.adheris.cap.capfoundation.objectdb.AbstractObjectDatabase:68


Thanks,
Clinton Moore

#2

The exception indicates that the EntityManagerFactory was already closed when an attempt to close it happened.

More information is needed in order to understand the context in which this problem occurred, please check the ObjectDB log files on the server and the client for more information.

To avoid future outage you may want to consider catching this exception and just writing the condition to a log file, because if the database connection is closed, further attempts to close it are not necessary.

ObjectDB Support

Reply