Repairing a “missing child” error on Magnolia 3.6.3

This little article is related to Magnolia 3.6.3 but it uses magnolia-tools, a common tool for any >3.5 version of Magnolia.

Case description
At tomcat start-up an error message, thrown by SearchIndexer says:

ERROR org.apache.jackrabbit.core.query.OnWorkspaceInconsistency 18.06.2009 16:38:38 Node /news/latest/2009/04/18 (16a3070f-5297-435b-b04b-304b889cb26d) has missing child 'latestnews-77811' (19d83f35-05cd-4f81-ace6-81477039fe61)
ERROR org.apache.jackrabbit.core.RepositoryImpl 18.06.2009 16:38:38 Unable to initialize workspace 'data'
javax.jcr.RepositoryException: Error indexing workspace: Error indexing workspace: Error indexing workspace

The approach of forcing consistency check within Jackrabbit configuration was not helpful, because Jackrabbit can fix missing references, but not missing nodes.

With a good help of our friend (Jan) we manage to fix this, althought some data has been lost.

1) Do a full backup, anyway
2) In this case, the affected workspace is “data”, so we created a /tmp folder within Magnolia AdminInterface
3) We moved the “father” on /tmp, again within AdminInterface
4) We deployed magnolia-tools (version 1.0.5) jar in webapp/WEB-INF/lib folder.
5) We copied the /bin folder of magnolia-tools on webapp folder
6) Now, to avoid time consumption, we commented out the “SearchIndexer” part on webapp/repositories/magnolia/workspaces/data/workspace.xml file
7) with tomcat stopped, we launch this from the /bin folder:

sh ./removenode --uuid 16a3070f-5297-435b-b04b-304b889cb26d --workspace
data --webapp /var/lib/tomcat5/webapps/magnoliaAuthor > log 2>&1

where 16a3070f-5297-435b-b04b-304b889cb26d is the node’s uuid of the parent of the missing node (missing node uuid = 19d83f35-05cd-4f81-ace6-81477039fe61).

Now the parent is removed and Magnolia can bootstrap fine!

8 and final step) Uncomment worskpace.xml and decide if remove the /bin folder, for security purpose.

Latest articles

Written by:

Be First to Comment

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

+ nove = 16