ITeye博客

The database is already in use by another process

nbaertuo · 2010-06-16 15:47 · 企业架构 · Markdown

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@afdb14ea[file =D:\db\human.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception:  另一个程序已锁定文件的一部分,进程无法访问。 : D:\db\human.lck

原写法:

def sql = Sql.newInstance("jdbc:hsqldb:file:d:/db/human ;ifexists=true", "sa",
                  "", "org.hsqldb.jdbcDriver")

 

正确写法:

def sql = Sql.newInstance("jdbc:hsqldb:hsql://localhost/xdb ;ifexists=true", "sa",
                  "", "org.hsqldb.jdbcDriver")

评论(1)

  1. #1 楼 · nforce_com · 2011-04-02 17:41

    :idea: 多谢!遇到同样问题看过后解决了!

评论功能维护中,当前仅展示历史评论。