Issue
Having a completely fresh install of Eclipse for EE Version: 2020-12 (4.18.0) on Win10 whenever I try to reindex it via the preferences dialog I get the following error:
Reindexing error
java.nio.channels.OverlappingFileLockException
I already tried:
- moving the Maven repo to a fresh and/or empty location
- starting with a fresh eclipse install and fresh workspace folder
- restarting the system and installing a fresh eclipse, eclipse workspace and maven repo
Any ideas on what to check or where to look besides doing a full reinstall of the OS would be greatly appreciated.
Here is the full Stack trace for the error from the m2e log (as requested by @nitind ):
2021-03-02 16:02:18,461 [Worker-10: Indexing Local Repository...] ERROR o.e.m.c.i.i.nexus.NexusIndexManager - Unable to re-index workspace://
java.nio.channels.OverlappingFileLockException: null
at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)
at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)
at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1297)
at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1178)
at org.apache.maven.index.context.DefaultIndexingContext.unlockForcibly(DefaultIndexingContext.java:927)
at org.apache.maven.index.context.DefaultIndexingContext.prepareIndex(DefaultIndexingContext.java:244)
at org.apache.maven.index.context.DefaultIndexingContext.purge(DefaultIndexingContext.java:612)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.purgeCurrentIndex(NexusIndexManager.java:529)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.reindexWorkspace(NexusIndexManager.java:561)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.updateIndex(NexusIndexManager.java:1072)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndex.updateIndex(NexusIndex.java:147)
at org.eclipse.m2e.core.ui.internal.preferences.MavenSettingsPreferencePage$2.runInWorkspace(MavenSettingsPreferencePage.java:263)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Solution
The problem was finally resolved by removing the system variable for M2_HOME that was pointing at an additional Maven installation on the system.
Eclipse seems to invoke this 2nd one during the reindexing operation thus leading to the OverlappingFileLockException.
Answered By - FrozenSUSHI
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.