我有HSQLDB数据库,我无法打开。 SQL客户端抛出以下异常:
java.sql.SQLException: error in script file line: 32 file input/output errorerror c:\db\mydb.data (Access is denied) opening file - file c:\db\mydb.data
at org.hsqldb.jdbc.Util.sqlException(Util.java:380)
at org.hsqldb.jdbc.Util.sqlException(Util.java:103)
at org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3303)
at org.hsqldb.jdbc.JDBCDriver.getConnection(JDBCDriver.java:321)
at org.hsqldb.jdbc.JDBCDriver.connect(JDBCDriver.java:259)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:214)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)
at org.eclipse.datatools.enablement.hsqldb.connection.HSQLDBJDBCConnectionFactory.createConnection(HSQLDBJDBCConnectionFactory.java:35)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.hsqldb.HsqlException: error in script file line: 32 file input/output errorerror c:\db\mydb.data (Access is denied) opening file - file c:\db\mydb.data
at org.hsqldb.error.Error.error(Error.java:131)
at org.hsqldb.scriptio.ScriptReaderText.readDDL(ScriptReaderText.java:151)
at org.hsqldb.scriptio.ScriptReaderBase.readAll(ScriptReaderBase.java:65)
at org.hsqldb.persist.Log.processScript(Log.java:759)
at org.hsqldb.persist.Log.open(Log.java:159)
at org.hsqldb.persist.Logger.openPersistence(Logger.java:288)
at org.hsqldb.Database.reopen(Database.java:218)
at org.hsqldb.Database.open(Database.java:185)
at org.hsqldb.DatabaseManager.getDatabase(DatabaseManager.java:240)
at org.hsqldb.DatabaseManager.newSession(DatabaseManager.java:157)
at org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3281)
... 12 more
第32行是创建数据模型的第一行,它包含创建缓存表语句。有什么可能导致这种情况?它可以治愈吗? 需要恢复数据。
答案 0 :(得分:3)
“访问被拒绝”通常意味着您的文件是只读的,或者已由其他进程(例如病毒检查程序)打开。有时,Windows本身会锁定文件,只有重启机器才能解锁。