I am trying to run EJB3 in action Chapter 2 code.
I am using Jboss version 4.2.2GA.
I am using defulat DB (Hyersonic DB)
I ran ant script to build an EAR file for Chapter 2 code and then i placed the EAR file on Jboss'deploy folder. On placing EAR file, i get below mentioned error on command prompt
" java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@e69accf7[file =C:\jboss-4.2.2.GA\server\default\data\hypersonic\localDB.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\jboss-4.2.2.GA\server\default\data\"
I am not able to understand which process is having a lock on DB
Please help me
It looks like you have a lock on the database that was not released...maybe jboss crashed or something and the lock remained...
Now i don't know hypersonic ...but sometimes on file based DBs you get the "lck" file with the current locked informations...and in
that case deleting the lck file would solve the issue...
...maybe try to copy the lck file out of the directory and see if it fixes the problem...