[
https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288021#comment-288021
]
Jesse Glick commented on MINDEXER-48:
-------------------------------------
All of the form:
{code}
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)
...
{code}
Note that {{NexusIndexerCliTest}} will actually fail with an NPE in a
{{finally}} block due to a misuse of {{finally}} which masks the root exception:
{code}
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 );
{code}
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
> Key: MINDEXER-48
> URL: https://jira.codehaus.org/browse/MINDEXER-48
> Project: Maven Indexer
> Issue Type: Bug
> Affects Versions: 4.1.2
> Reporter: Jesse Glick
> Priority: Critical
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when
> using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely
> prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira