It is not uncommon for us to have problems starting or stopping H2 Database Connections.
Typically it happens when we are starting multiple applications at the same time that share a common database ( AUTO_SERVER=TRUE ).
Most often the exception is states that the connection was unsuccessful and will be retried in (n) seconds. - This exception is common but typically recovers without issue.
However more and more often, we have experienced the database hanging on shutdown when reading or writing Clobs to the same database table from multiple applications.
This has been known to corrupt our DB file.
We have updated to the newest beta version hoping for some cure to our hanging shutdown because I noticed in the change logs that some work was done around the lob area.
The exception that I am posting today is new to us. Could this be something that was introduced with this latest version?
Thanks as always for your work and quick responses,
Kent
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:h2:../data/audit/msgfwd;COMPRESS=TRUE;AUTOCOMMIT=ON;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE;MV_STORE=FALSE;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=7799, username = XX. Terminating connection pool (set lazyInit to true if you expect to start your database after your app).
Original Exception: ------
org.h2.jdbc.JdbcSQLException: Error opening database: "Lock file recently modified" [8000-182]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.store.FileLock.getExceptionFatal(FileLock.java:456)
at org.h2.store.FileLock.waitUntilOld(FileLock.java:310)
at org.h2.store.FileLock.lockFile(FileLock.java:347)
at org.h2.store.FileLock.lock(FileLock.java:135)
at org.h2.engine.Database.open(Database.java:631)
at org.h2.engine.Database.openDatabase(Database.java:266)
at org.h2.engine.Database.<init>(Database.java:260)
at org.h2.engine.Engine.openSession(Engine.java:60)
at org.h2.engine.Engine.openSession(Engine.java:167)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145)
at org.h2.engine.Engine.createSession(Engine.java:128)
at org.h2.engine.Engine.createSession(Engine.java:26)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:347)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
at org.h2.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:363)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
at com.issinc.cds.db.H2JDBCBoneCP.getConnection(H2JDBCBoneCP.java:80)
at com.issinc.cds.sb.h2.CdsMsgFwdDbConnection.initializeH2DB(CdsMsgFwdDbConnection.java:35)
at com.issinc.cds.sb.h2.AbstractH2DbConnection.createNewConnection(AbstractH2DbConnection.java:77)
at com.issinc.cds.sb.h2.AbstractH2DbConnection.<init>(AbstractH2DbConnection.java:39)
at com.issinc.cds.sb.h2.CdsMsgFwdDbConnection.<init>(CdsMsgFwdDbConnection.java:19)
at com.issinc.cds.sb.mfwd.impl.FwdMsgQueueManager.<init>(FwdMsgQueueManager.java:62)
at com.issinc.cds.sbsend.main.impl.SendDataSyncXMLEngine.initMessageForwardingOutput(SendDataSyncXMLEngine.java:489)
at com.issinc.cds.sbsend.main.impl.SendDataSyncXMLEngine.start(SendDataSyncXMLEngine.java:245)
at com.issinc.cds.sbsend.main.Main.main(Main.java:170)