CQ5 AEM : org.apache.lucene.index.IndexFormatTooOldException

If your CQ5 instance doesn’t come up and you see this in the logs:

*WARN* [FelixStartLevel] org.apache.jackrabbit.core.query.lucene.DefaultRedoLog Malformed redo entry:
*ERROR* [FelixStartLevel] org.apache.jackrabbit.core.RepositoryImpl Failed to initialize workspace ‘crx.default’ javax.jcr.RepositoryException: Unable to initialize query handler: com.day.crx.query.lucene.LuceneHandler@136aaffc

Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource: ChecksumIndexInput(segments_1)): 0 (needs to be between -1 and -11). This version of Lucene only supports indexes created with release 1.9 and later.

Solution:

  1. Stop CQ
  2. Go to crx-quickstart\repository\workspaces\crx.default
  3. Delete the index_* files
  4. In the workspace.xml, add the three lines
    <SearchIndex class=”com.day.crx.query.lucene.LuceneHandler”>
    <param name=”path” value=”${wsp.home}/index”/>
      <param name=”enableConsistencyCheck” value=”true”/>
        <param name=”forceConsistencyCheck” value=”true”/>
        <param name=”autoRepair” value=”true”/>
    </SearchIndex>
  5. Restart.
  6. If still have issue, drop the index folder under crx.default.

Related error : http://letuscq.blogspot.com/2014/07/instance-does-not-start-access-is-denied.html

Advertisements

cq5 aem – disabling wcm on author by default

You can work on author instance with wcm disabled by using Apache httpd, using a rewrite rule, as shown below:
RewriteEngine On
RewriteRule ^(/content/.*)$ $1?wcmmode=disabled [QSA]