Erro de codec Lucene3x após a atualização do AEM 6.0 ou 6.1 para 6.4 ou posterior | AEM 6.x

Problema

Após a atualização do AEM 6.0 ou 6.1 para o AEM 6.3 ou 6.4, o seguinte erro aparece nos logs:

22.05.2018 16:48:19.289 *WARN* [async-index-update-async] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor Failed to index the node [/home/users/a/admin/.tokens/2018-05-22T16.11.10.600-05.00]
java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene3x' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath.The current classpath supports the following names: [Lucene40, Lucene41, Lucene42, Lucene45, Lucene46, oakCodec]
at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:109)
at org.apache.lucene.codecs.Codec.forName(Codec.java:95)
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:370)
at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:404)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:843)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:694)
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:400)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:746)
at org.apache.jackrabbit.oak.plugins.index.lucene.writer.DefaultIndexWriter.getWriter(DefaultIndexWriter.java:164)
at org.apache.jackrabbit.oak.plugins.index.lucene.writer.DefaultIndexWriter.updateDocument(DefaultIndexWriter.java:92)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:250)
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140)
at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(CompositeEditor.java:74)
at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:130)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:500)
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
at org.apache.jackrabbit.oak.segment.MapRecord$2.childNodeChanged(MapRecord.java:401)
at org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:442)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:490)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:433)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:391)
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:555)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
at org.apache.jackrabbit.oak.segment.MapRecord$2.childNodeChanged(MapRecord.java:401)
at org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:442)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:490)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:433)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:391)
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:415)
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
at org.apache.jackrabbit.oak.segment.MapRecord$2.childNodeChanged(MapRecord.java:401)
at org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:442)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:490)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:433)
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:391)
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.updateIndex(AsyncIndexUpdate.java:695)
at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.runWhenPermitted(AsyncIndexUpdate.java:543)
at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:402)
at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:118)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Ambiente

Atualização do AEM 6.0 ou 6.1 para 6.3 ou 6.4

Causa

O upgrade do AEM não atualiza a definição do índice automaticamente.

Resolução

  1. Vá para http://aem-host:port/crx/de/index.jsp e efetue logon como o usuário administrador.
  2. Exclua o índice /oak: index/lucene.
  3. Reinicie o AEM.
  4. Monitore os logs para indexação do novo /oak: index/ lucene índice.
Observação:

A indexação não leva muitas horas. No entanto, ela é necessária para o êxito da atualização.

** Agradecemos Charu Jain por ajudar a Adobe a identificar esse problema de produto.

 Adobe

Receba ajuda com mais rapidez e facilidade

Novo usuário?