OpenJPA, HSQLDB and proper shutdown
I’m starting to get tired of OpenJPA/HSQLDB setup that I’ve trying: it seems to give more problems than it solves. Now I discovered that the HSQL db wasn’t been properly shutdown and for reasons that I’m investigating, if the HSQL db is not propertly closed (SHUTDOWN command) it’s impossible to reopen it again. It fails with a IndexOutOfBoundsException. Caused by: org.hsqldb.HsqlException: error in script file line: 33 java.io.IOException: java.lang.IndexOutOfBoundsException in statement [SET TABLE PUBLIC.NOTES INDEX '2883070'] at org.hsqldb.Error.error(Error.java:111) at org.hsqldb.scriptio.ScriptReaderText.readDDL(ScriptReaderText.java:132) at org.hsqldb.scriptio.ScriptReaderBase.readAll(ScriptReaderBase.java:88) at org.hsqldb.persist.Log.processScript(Log.java:721) at org.hsqldb.persist.Log.open(Log.java:187) at org.hsqldb.persist.Logger.openPersistence(Logger.java:209) at org.hsqldb.Database.reopen(Database.java:265) at org.hsqldb.Database.open(Database.java:235) at org.hsqldb.DatabaseManager.getDatabase(DatabaseManager.java:222) at org.hsqldb.DatabaseManager.newSession(DatabaseManager.java:145) at org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3219) ... 59 more Annoying. This is not OpenJPA fault, but it gets complicated to actually solve it. ...