I have an app running on tomcat7. For the database purpose, I am using hsqldb(1.8.0.7). In the webapp, I have several sql commands I want to run. However, the schema is not loaded from the app. I do it seperately with sqltool. The schema is loaded fine and I can easily see the database and its details with sqltool. But when I run my app from the browser after deploying to tomcat7, I get the following error:
java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@4aedf056[file =/home/boonbd/db/mydb.lck, exists=false, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /home/boonbd/db/mydb.lck (Permission denied)
My jdbc url is:
jdbc:hsqldb:file:/home/boonbd/db/mydb;shutdown=true
When I created the db with sqltool, I am using the same username and password that I am passing in the app. I do quit sqltool before running the app, so no other app I know is actually using the database. So, that should not be a problem. I have the right to this folder so I should have permissions. Most of the suggestions I found online were because the path was relative and user didn't have permission to modify tomcat folders. That should not be the case here.
I am using hsqldb for the first time so am not able to get around. Any help would be appreciated.
Aucun commentaire:
Enregistrer un commentaire