db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Reynolds" <mark.reynolds.n...@gmail.com>
Subject Re: ERROR XSLA6: Cannot recover the database.
Date Fri, 25 Jul 2008 00:22:09 GMT
Yes, disk write caching was enabled and the power was cut to the macine.
Thank you!

On Thu, Jul 24, 2008 at 6:16 AM, Kristian Waagan <Kristian.Waagan@sun.com>
wrote:

> Mark Reynolds wrote:
>
>> One of our users got this when they restarted our application after it was
>> abruptly terminated (not sure what happened, maybe someone pulled the plug
>> on the machine or killed the process while it was writing to the Derby
>> database). We are using Derby in embedded mode on the local hard drive.
>>
>> Is Derby supposed to be resilient to this kind of circumstance? Or should
>> I just expect that the database may well be unrecoverable in the case of an
>> abnormal termination (requiring the user to resort to a backup)?
>>
>
> Hi Mark,
>
> If the hardware is configured correctly, Derby should be resilient to
> abnormal termination.
>
> Based on the paths in the log, I see you are running on Windows. As far as
> I know, the disk write cache is enabled by default in Windows, and because
> of that writes can be lost if the plug is pulled (power loss). This can lead
> to either loss of committed transactions or recovery failure.
>
> If the disk cache is enabled you have to assume the worst and resort to
> backup. Derby should be able to handle getting killed.
> There is some information on this in the presentation "Configuring Apache
> Derby for Performance and Durability" written by Olav Sandstå.
>
>
> If you find out that the write cache was disabled, you should log a bug
> against Derby or come back to the list.
>
>
>
> hth,
> --
> Kristian
>
>
>> ----------------------------------------------------------------
>> 2008-07-23 14:54:36.861 GMT:
>>  Booting Derby version The Apache Software Foundation - Apache Derby -
>> 10.4.1.3 <http://10.4.1.3> - (648739): instance
>> a816c00e-011b-506a-1bb3-fffff8e54afd
>>
>> on database directory C:\Program Files\My Company\Server\db\data
>>
>> ------------  BEGIN SHUTDOWN ERROR STACK -------------
>>
>> ERROR XSLA6: Cannot recover the database.
>>    at org.apache.derby.iapi.error.StandardException.newException(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
>>    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
>> Source)
>>    at
>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
>> Source)
>>    at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
>> Source)
>>    at
>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
>> Source)
>>    at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
>>    at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
>>    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
>> Source)
>>    at
>> org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown
>> Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
>> Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
>>    at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
>>    at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>    at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
>>    at
>> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
>>    at
>> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
>>    at
>> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
>>    at
>> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
>>    at
>> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
>>    at
>> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
>>    at
>> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
>>    at
>> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>> Caused by: java.lang.ClassCastException:
>> org.apache.derby.impl.store.access.btree.index.B2IUndo cannot be cast to
>> org.apache.derby.impl.store.raw.log.LogRecord
>>    at
>> org.apache.derby.impl.store.raw.log.Scan.getNextRecordForward(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.Scan.getNextRecord(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.FileLogger.readLogRecord(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.LogToFile.findCheckpoint(Unknown
>> Source)
>>    ... 35 more
>> ============= begin nested exception, level (1) ===========
>> java.lang.ClassCastException:
>> org.apache.derby.impl.store.access.btree.index.B2IUndo cannot be cast to
>> org.apache.derby.impl.store.raw.log.LogRecord
>>    at
>> org.apache.derby.impl.store.raw.log.Scan.getNextRecordForward(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.Scan.getNextRecord(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.FileLogger.readLogRecord(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.LogToFile.findCheckpoint(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown
>> Source)
>>    at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
>>    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
>> Source)
>>    at
>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
>> Source)
>>    at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
>> Source)
>>    at
>> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
>> Source)
>>    at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
>>    at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
>>    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
>> Source)
>>    at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
>> Source)
>>    at
>> org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
>> Source)
>>    at
>> org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown
>> Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
>> Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
>>    at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
>>    at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
>>    at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>    at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
>>    at
>> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
>>    at
>> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
>>    at
>> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
>>    at
>> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
>>    at
>> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
>>    at
>> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
>>    at
>> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
>>    at
>> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
>> ============= end nested exception, level (1) ===========
>>
>>
>> ------------  END SHUTDOWN ERROR STACK -------------
>>
>
>

Mime
View raw message