Skip to end of metadata
Go to start of metadata

Sometimes, the internal datastructure of jackrabbit can become inconsistent. A node references a child that no longer exists. Indexing such a node will lead the errormessages like

This typically occurs after the deletion of the searchindex directory. JackRabbit access all nodes detects the inconsistency. As a result, WebManager will not startup.
JackRabbit is capable to detect and solve problems in the JCR by itself.
This is a startup option that is not active by default because this would cause a download of the entire JCR from the database with every restart.
When problems with the JCR occur, it can be a usefull option to switch on. 

Be careful for applying this to environments that are running live sites. The consistencyFix of JackRabbit should be tested first on a duplicate environment (for example a test environment).

To switch it on:
- Stop WebManager

- Make a backup of the current repository.xml- Add the following options to the Workspace's PersistenceManager section:

          To only perform a check:

          Or to perform both a JCR check and repair.

- When the repository.xml has been changed the rest of the content of the (below) folder must be purged after a backup of the JCR in the database has been made.

- Now WebManager can be started, during this startup JackRabbit will perform the consistency check and repair.
  Also the SearchIndex will rebuilt. This process can take somewhere from several minutes to several hours depending on the size of the JCR.

The logfile wil contain messages like this:

When the restart has finished successfully the following steps must be performed to complete the repair this procedure:

- Stop WebManager
- Restore the original repository.xml , before the extra parameters were added.
- Purge the <<WebManager install dir>>\work\JCR folder again (except for the repository.xml)
- Start WebManager

After these actions JackRabbit is consistent again and WebManager should function as normal.

Problems found during the consistency check/repair are logged in the catalina.out.

Sometimes "weird" JCR nodes (node UUIDs) are mentioned in the logfile during a consistency check, e.g."deadbeef-face-babe-cafe-babecafebabe".
These are static identifiers for system nodes and there are four of them:

They are named this way so that they are easily identifiable in logfiles and won't be confused with normal node UUIDs.

Guidelines for distributed environments 

When running on a distributed environment the steps described above should be applied to the 'master' instance.

After the 'master' instance fully up and running again (in other words when you successfully followed all steps) take the following steps for each 'slave' instance one at a time:
- Stop the 'slave' instance
- Purge the <<WebManager install dir>>\work\JCR folder (except for the repository.xml)
- Start the 'slave' instance
- Repeat the above step for the next 'slave' instance