db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <de...@segel.com>
Subject RE: Corrupted database
Date Wed, 17 Jun 2009 11:30:18 GMT
Hi,

I don't know if just going in to the database with a hex editor is going to
really fix your problem... 

The issue of corrupted indexes and corrupted databases will continually
plague javaDB/Derby because of its market niche and design. Cloudscape was
designed as a lightweight database and now people are using it beyond its
initial design. (If you think about it, you can only fit so much in to a
small footprint...)

I really think that those left of Sun, soon to be Oracle, that are
supporting JavaDB, should consider the development of such tool(s). The
reason I suggest this core team is that they are the ones who would benefit
the most from the tool(s). (They are paid to support JavaDB and it would
make their lives easier, plus they tend to know more about the inner
workings of javaDB.)

But hey! Its just a thought. ;-)

-Mikey


> -----Original Message-----
> From: Gabor 'Morc' KORMOS [mailto:morc@baxter-it.com]
> Sent: Wednesday, June 17, 2009 4:55 AM
> To: derby-user@db.apache.org
> Subject: Corrupted database
> 
>   Hi,
> 
>   I saw a post just the other day detailing how to fix a CRC error
> although this does not cover my problem because the corruption does not
> surface during boot rather on query. I use Sonar which uses Derby
> embedded, but unfortunately one of the versions which is known to
> corrupt data, 10.3.1.4.
>   OK, so the problem is that on query the Debry instance just shuts down
> detecting the CRC error. I used a hex editor to fix the CRC (it's in the
> first page of the file) but then I get another error (see below). Could
> someone help me fix this even by sending her/him the whole database (not
> huge, 240MB uncompressed)?
> 
>   Thanks,
> 
>   Gabor 'Morc' Kormos.
> 
> 2009-06-17 09:52:59.011 GMT Thread[DRDAConnThread_9,5,derby.daemons]
> (XID = 151484434), (SESSIONID = 2), (DATABASE = sonar), (DRDAID =
> NF000001.GCDA-4269129726538145963{4}), Failed Statement is: select *
> from project_measures
> java.lang.IllegalArgumentException: Bit position 1 is outside the legal
> range
>     at
> org.apache.derby.iapi.services.io.FormatableBitSet.checkPosition(Unknown
> Source)
>     at org.apache.derby.iapi.services.io.FormatableBitSet.isSet(Unknown
> Source)
>     at
> org.apache.derby.impl.store.raw.data.AllocExtent.getPageStatus(Unknown
> Source)
>     at
> org.apache.derby.impl.store.raw.data.AllocationCache.getPageStatus(Unknown
> Source)
>     at
> org.apache.derby.impl.store.raw.data.FileContainer.pageValid(Unknown
> Source)
>     at
> org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(Unknown
> Source)
>     at
> org.apache.derby.impl.store.raw.data.FileContainer.getPage(Unknown Source)
>     at
> org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(Unknown
> Source)
>     at
> org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglo
> merate(Unknown
> Source)
>     at
> org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unkno
> wn
> Source)
>     at
> org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate
> (Unknown
> Source)
>     at
> org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostControll
> er(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unk
> nown
> Source)
>     at
> org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(U
> nknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
>     at
> org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown
> Source)
>     at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unkno
> wn
> Source)
>     at
> org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown
> Source)
>     at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown
> Source)
>     at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
>     at
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInt
> ernalStatement(Unknown
> Source)
>     at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown
> Source)
>     at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
>     at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
>     at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
>     at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown
> Source)
>     at
> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
> Source)
>     at
> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
> Source)
>     at
> org.apache.derby.impl.drda.DRDAStatement.prepareStatementJDBC3(Unknown
> Source)
>     at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
>     at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown
> Source)
>     at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown
> Source)
>     at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown
> Source)
>     at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)



Mime
View raw message