jira-importer commented on issue #457: URL: https://github.com/apache/maven-indexer/issues/457#issuecomment-2965142762
**[Jesse N. Glick](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jglick)** commented All of the form: ``` org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@.../index lockFactory=org.apache.lucene.store.NativeFSLockFactory@140cc82: files: [write.lock] at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:712) at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:75) at org.apache.lucene.index.IndexReader.open(IndexReader.java:462) at org.apache.lucene.index.IndexReader.open(IndexReader.java:322) at org.apache.maven.index.context.DefaultIndexingContext.openAndWarmupReaders(DefaultIndexingContext.java:515) ... ``` Note that `NexusIndexerCliTest` will actually fail with an NPE in a `finally` block due to a misuse of `finally` which masks the root exception: ``` Index: indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java =================================================================== --- indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java (revision 1230088) +++ indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java (working copy) @@ -342,16 +342,12 @@ } NexusIndexer indexer = plexus.lookup( NexusIndexer.class ); - IndexingContext context = null; - // this is a CLI/batch invocation, don't coggle it with threads DefaultIndexingContext.BLOCKING_COMMIT = true; - try - { long tstart = System.currentTimeMillis(); - context = indexer.addIndexingContext( // + IndexingContext context = indexer.addIndexingContext( // repositoryName, // context id repositoryName, // repository id repositoryFolder, // repository folder @@ -360,6 +356,8 @@ null, // index update url indexers ); + try + { IndexPacker packer = plexus.lookup( IndexPacker.class ); ArtifactScanningListener listener = new IndexerListener( context, debug, quiet ); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org