jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vidar Ramdal <vi...@idium.no>
Subject Re: Reparing "Node has missing child"
Date Thu, 27 May 2010 12:31:49 GMT
On Fri, May 21, 2010 at 1:02 PM, Vidar Ramdal <vidar@idium.no> wrote:
> We recently ran into this situation when running a specific query:
> java.lang.IndexOutOfBoundsException: bitIndex < 0: -1
>        at java.util.BitSet.get(BitSet.java:441)
>        at org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisScorer.isValid(DescendantSelfAxisQuery.java:557)
>        at org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisScorer.next(DescendantSelfAxisQuery.java:461)
>        at org.apache.lucene.search.Scorer.score(Scorer.java:57)
>        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:136)
> [...]
> According to the thread at [1], a rebuild of the Lucene index should do it.
> So, we deleted the index directories, and fired up the application
> again. The indexing started, and apparently completed, but the
> application failed to start the repository:
> org.apache.jackrabbit.core.query.OnWorkspaceInconsistency Node
> /obeas/content/textwithimage_f4d72139-4301-40fa-83bc-36ac1c82629e
> (56fae4a0-d046-41d5-9bdb-8ce950bbf6bb) has missing child
> '1272352031680.MaxSize.w-900.h-900.Save.png'
> (f3753a52-8bd8-462e-b0f4-bbe36f7ff1d0)
> 21.05.2010 10:33:22.909 *ERROR* [SCR Component Actor]
> org.apache.jackrabbit.core.RepositoryImpl Failed to initialize
> workspace 'default' javax.jcr.RepositoryException: Error indexing
> workspace: Error indexing workspace: Error indexing workspace
>        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:540)
>        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:213)
>        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1790)
>        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doPostInitialize(RepositoryImpl.java:2008)
>        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1921)
> [...]
> A couple of desperate Google searches later, we found [2], which in
> short recommends adding parameters consistencyCheck and consistencyFix
> to repository.xml (we also tried adding it to workspace.xml, but that
> failed because DerbyPersistenceManager didn't support those
> parameters).
> This caused the index to be rebuilt again, but fail at the same point.
> We're running Jackrabbit 1.6 with DerbyPersistenceManager.
> Any suggestions?

For anyone with similar problems, I'll update the thread with what we
did to work around the issue.

The reason for consistencyCheck and consistencyFix not working, was
that we were using
org.apache.jackrabbit.core.state.DB.DerbyPersistenceManager which does
not support those parameters (at least according to docs [3]).

So what we had to do was export all content to a fresh repository,
using exportSystemView. Depending on repository size, this may be a
heavy operation, so we did it in batches (running exportSystemView on
each root node separately). To prevent the possibly corrupt node to
cause trouble for the export, the node was moved (without problems) to
a root node we skipped exporting.

The fresh repository was set up using
which according to docs [4] DOES support consistencyCheck and
consistencyFix. So if a similar situation should arise again, we have
better chances of recovering.

The exported XML files were then successfully imported to the fresh
repository using importXML. We then replaced the corrupt repository
files with the fresh ones.

As a side note, we're experiencing noticeable better performance using
o.a.j.c.p.bundle.* than we did using o.a.j.c.p.db.*.

> [1] http://markmail.org/thread/kyk4mlfheajztofg
> [2] http://wiki.gxdeveloperweb.com/confluence/display/GXDEV/How+to+repair+a+'corrupt'+JCR

[3] http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/state/db/DerbyPersistenceManager.html
[4] http://jackrabbit.apache.org/api/1.3/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.html

Vidar S. Ramdal <vidar@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 22 00 84 76
Quando omni flunkus moritatus!

View raw message