eclipse-mylyn / org.eclipse.mylyn

Eclipse Public License 2.0
13 stars 9 forks source link

Task search index is broken after platform update, attempts to load a non-existing lucene version. #492

Closed gvl2023 closed 4 months ago

gvl2023 commented 4 months ago

Discussed in https://github.com/eclipse-mylyn/org.eclipse.mylyn/discussions/479

Originally posted by **gvl2023** April 1, 2024 Getting the following error after updating to the 4.31 simultaneous release. Happens on startup and task list synchronization. More of a nuisance as it doesn't appear to affect basic functionalities. Any workarounds? ``` An internal error occurred during: "Task List Indexer". java.lang.IllegalArgumentException: Could not load codec 'Lucene95'. Did you forget to add lucene-backward-codecs.jar? at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:520) at org.apache.lucene.index.SegmentInfos.parseSegmentInfos(SegmentInfos.java:409) at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:368) at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:304) at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:546) at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:543) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:820) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:770) at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:548) at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:532) at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1011) at org.eclipse.mylyn.internal.tasks.index.core.TaskListIndex.createIndexWriter(TaskListIndex.java:1282) at org.eclipse.mylyn.internal.tasks.index.core.TaskListIndex.rebuildIndexCompletely(TaskListIndex.java:1228) at org.eclipse.mylyn.internal.tasks.index.core.TaskListIndex.maintainIndex(TaskListIndex.java:1095) at org.eclipse.mylyn.internal.tasks.index.core.TaskListIndex$MaintainIndexJob.run(TaskListIndex.java:184) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Suppressed: org.apache.lucene.index.CorruptIndexException: checksum passed (9cd13f06). possibly transient resource issue, or a Lucene or JVM bug (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/home/vladg/workspace/eclipse-workspace/.metadata/.mylyn/.taskListIndex/segments_1a"))) at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:501) at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:375) ... 13 more Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene95' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [Lucene99] at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:113) at org.apache.lucene.codecs.Codec.forName(Codec.java:118) at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:516) ... 15 more ```
ruspl-afed commented 4 months ago

It seems that codecs are not visible to Lucene for some reason. PRs are welcome.

gvl2023 commented 4 months ago

I needed to add that I was able to work around this issue by deleting all files in .metadata/.mylyn/.taskListIndex, Eclipse restarted and it works fine, presumably the task list got reindexed by the Lucene version that's available?