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 2008/04/09 11:51:25 UTC
[jira] Commented: (LUCENE-1262) NullPointerException from
FieldsReader after problem reading the index
[ https://issues.apache.org/jira/browse/LUCENE-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587117#action_12587117 ]
Michael McCandless commented on LUCENE-1262:
--------------------------------------------
Those stack traces look like 2.1 not 2.3.1. Is that right?
Can you post the index that you are using and the code that results in the 2nd exception? I can't get the 2nd exception to happen in a test case...
> NullPointerException from FieldsReader after problem reading the index
> ----------------------------------------------------------------------
>
> Key: LUCENE-1262
> URL: https://issues.apache.org/jira/browse/LUCENE-1262
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Affects Versions: 2.3.1
> Reporter: Trejkaz
>
> There is a situation where there is an IOException reading from Hits, and then the next time you get a NullPointerException instead of an IOException.
> Example stack traces:
> java.io.IOException: The specified network name is no longer available
> at java.io.RandomAccessFile.readBytes(Native Method)
> at java.io.RandomAccessFile.read(RandomAccessFile.java:322)
> at org.apache.lucene.store.FSIndexInput.readInternal(FSDirectory.java:536)
> at org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:74)
> at org.apache.lucene.index.CompoundFileReader$CSIndexInput.readInternal(CompoundFileReader.java:220)
> at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:93)
> at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:34)
> at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:57)
> at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:88)
> at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:344)
> at org.apache.lucene.index.IndexReader.document(IndexReader.java:368)
> at org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:84)
> at org.apache.lucene.search.Hits.doc(Hits.java:104)
> That error is fine. The problem is the next call to doc generates:
> java.lang.NullPointerException
> at org.apache.lucene.index.FieldsReader.getIndexType(FieldsReader.java:280)
> at org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:216)
> at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:101)
> at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:344)
> at org.apache.lucene.index.IndexReader.document(IndexReader.java:368)
> at org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:84)
> at org.apache.lucene.search.Hits.doc(Hits.java:104)
> Presumably FieldsReader is caching partially-initialised data somewhere. I would normally expect the exact same IOException to be thrown for subsequent calls to the method.
--
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org