You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2010/10/30 17:33:22 UTC
[jira] Resolved: (LUCENE-2496) NPE if you open IW with CREATE on an
index with no segments file
[ https://issues.apache.org/jira/browse/LUCENE-2496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-2496.
----------------------------------------
Resolution: Fixed
> NPE if you open IW with CREATE on an index with no segments file
> ----------------------------------------------------------------
>
> Key: LUCENE-2496
> URL: https://issues.apache.org/jira/browse/LUCENE-2496
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Priority: Minor
> Fix For: 3.1, 4.0
>
> Attachments: LUCENE-2496.patch
>
>
> I have a simple test case that hits this NPE:
> {noformat}
> [junit] java.lang.NullPointerException
> [junit] at java.io.File.<init>(File.java:305)
> [junit] at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:67)
> [junit] at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:333)
> [junit] at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:213)
> [junit] at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:218)
> [junit] at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1113)
> [junit] at org.apache.lucene.index.TestIndexWriter.testNoSegmentFile(TestIndexWriter.java:4975)
> [junit] at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:277)
> {noformat}
> It happens if you have an aborted index, ie, there are segment files in there (*.frq, *.tis, etc.) but no segments_N file, and then you try to open an IW with CREATE on that index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org