'How to fix Help search and indexing in Eclipse?
Every time I try to search Help in Eclipse, or I click on a ? icon to access Help where it then tries and fails to perform an indexing operation, I get the following error:
Could not load codec 'Lucene84'. Did you forget to add lucene-backward-codecs.jar?
The only things I've ever found about problems related to lucene-backward-codecs.jar, which always refer to programming using lucene rather than anything related to the Help system, suggest adding lucene-backward-codecs.jar as an external jar to the Java build path. As expected, this makes no difference.
Help in my Eclipse has been crippled like this for a while. I stubbornly kept searching occasionally, thinking I'd eventually come across a solution or that it would get fixed in some update.
Does anyone know of a way to resolve this issue or have any suggestions?
In case it makes a difference, I'm currently using Eclipse Version: 2021-03 (4.19) Build id: X20210311-1732 on Fedora 34 with Xfce as the desktop.
Session information after starting Eclipse and attempting to search Help, from the .log file in the workspace .metadata directory:
!SESSION 2022-02-11 06:25:40.065 -----------------------------------------------
eclipse.buildId=4.19.0.v20210304-1735
java.version=11.0.13
java.vendor=Red Hat, Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.libreoffice.ide.eclipse.core 1 1 2022-02-11 06:26:05.818
!MESSAGE LOEclipseIntegration started
!ENTRY org.libreoffice.ide.eclipse.core 0 0 2022-02-11 06:26:17.587
!MESSAGE Java nature set
!ENTRY org.libreoffice.ide.eclipse.core 0 0 2022-02-11 06:26:17.604
!MESSAGE Language specific nature added
!ENTRY org.libreoffice.ide.eclipse.core 1 1 2022-02-11 06:26:17.983
!MESSAGE Resources changes are now listened
!ENTRY org.libreoffice.ide.eclipse.core 1 1 2022-02-11 06:26:17.984
!MESSAGE Java UNO resources changes are now listened
!ENTRY org.eclipse.help.base 4 0 2022-02-11 06:27:23.038
!MESSAGE Errors while indexing
!STACK 0
java.lang.IllegalArgumentException: Could not load codec 'Lucene84'. Did you forget to add lucene-backward-codecs.jar?
at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:449)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:356)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:291)
at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:461)
at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:458)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:720)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:672)
at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:463)
at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2794)
at org.eclipse.help.internal.search.SearchIndex.merge(SearchIndex.java:559)
at org.eclipse.help.internal.search.IndexingOperation.mergeIndexes(IndexingOperation.java:546)
at org.eclipse.help.internal.search.IndexingOperation.addNewDocuments(IndexingOperation.java:152)
at org.eclipse.help.internal.search.IndexingOperation.execute(IndexingOperation.java:108)
at org.eclipse.help.internal.search.LocalSearchManager.updateIndex(LocalSearchManager.java:629)
at org.eclipse.help.internal.search.LocalSearchManager.ensureIndexUpdated(LocalSearchManager.java:603)
at org.eclipse.help.internal.search.federated.IndexerJob.run(IndexerJob.java:35)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Suppressed: org.apache.lucene.index.CorruptIndexException: checksum passed (ad56ac35). possibly transient resource issue, or a Lucene or JVM bug (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/home/David/.eclipse/org.eclipse.platform_155965261_linux_gtk_x86_64/configuration/org.eclipse.osgi/91/0/.cp/index/segments_1")))
at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:466)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:434)
... 15 more
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene84' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [Lucene86]
at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:116)
at org.apache.lucene.codecs.Codec.forName(Codec.java:116)
at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:445)
... 16 more
!ENTRY org.eclipse.core.jobs 4 2 2022-02-11 06:27:23.299
!MESSAGE An internal error occurred during: "Local Help".
!STACK 0
java.lang.IllegalArgumentException: Could not load codec 'Lucene84'. Did you forget to add lucene-backward-codecs.jar?
at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:449)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:356)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:291)
at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:461)
at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:458)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:720)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:672)
at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:463)
at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2794)
at org.eclipse.help.internal.search.SearchIndex.merge(SearchIndex.java:559)
at org.eclipse.help.internal.search.IndexingOperation.mergeIndexes(IndexingOperation.java:546)
at org.eclipse.help.internal.search.IndexingOperation.addNewDocuments(IndexingOperation.java:152)
at org.eclipse.help.internal.search.IndexingOperation.execute(IndexingOperation.java:108)
at org.eclipse.help.internal.search.LocalSearchManager.updateIndex(LocalSearchManager.java:629)
at org.eclipse.help.internal.search.LocalSearchManager.ensureIndexUpdated(LocalSearchManager.java:603)
at org.eclipse.help.internal.search.LocalSearchManager.search(LocalSearchManager.java:548)
at org.eclipse.help.internal.search.SearchManager.searchLocal(SearchManager.java:107)
at org.eclipse.help.internal.search.SearchManager.search(SearchManager.java:98)
at org.eclipse.help.internal.search.federated.LocalHelp.run(LocalHelp.java:74)
at org.eclipse.help.internal.search.federated.FederatedSearchJob.run(FederatedSearchJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Suppressed: org.apache.lucene.index.CorruptIndexException: checksum passed (ad56ac35). possibly transient resource issue, or a Lucene or JVM bug (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/home/David/.eclipse/org.eclipse.platform_155965261_linux_gtk_x86_64/configuration/org.eclipse.osgi/91/0/.cp/index/segments_1")))
at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:466)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:434)
... 19 more
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene84' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [Lucene86]
at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:116)
at org.apache.lucene.codecs.Codec.forName(Codec.java:116)
at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:445)
... 20 more
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
