I also got the same error. Finally, I decided it yourself. The problem is connected with the wrong URL-address of the connection.
connection = DriverManager.getConnection ("jdbc:hsqldb:file:///D:/hsql/testdb;shutdown=true;ifexists=true", "sa", "");
Here testdb - name db, you are trying to connect. I used data source plug-in to connect to eclipse hsql. when setting up, I gave the database location as D: / hsql / testdb. so this caused the problem.
I was trying to remove a table from testdb, before creating a table in testdb.
Also, if you connect to the db using data source plug-in eclipse, make sure that you execute the command SHUTDOWN before running java application, otherwise it will display the following error
Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@d9999e76 [file =D:\hsql\testdb.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2015-09-30 15:09:55 heartbeat - read: -3700 ms
Hope this will be helpful.
source share