lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: [lucene 4.6] NPE when calling IndexReader#openIfChanged
Date Thu, 15 May 2014 09:42:41 GMT
delGen=-1 means there are no deletions, but the exception makes no
sense because up above SegmentReader.java calls si.hasDeletions()
which returns delGen != -1 which should have mean
Lucene40LiveDocsFormat.readLiveDocs should not have been called.  It
seems impossible :)

What java version?

Mike McCandless

http://blog.mikemccandless.com


On Wed, May 14, 2014 at 2:16 AM, Clemens Wyss DEV <clemensdev@mysign.ch> wrote:
> Tackled this down a little bit more:
> Lucene40LiveDocsFormat#readLiveDocs calls IndexFileNames#fileNameForGeneration
> If I get this right, param 'gen' seems to be -1.
> Gen is being gathered from SegmentCommitInfo#getDelGen
>
> What does "delGen == -1" mean?
>
> -----Urspr√ľngliche Nachricht-----
> Von: Clemens Wyss DEV [mailto:clemensdev@mysign.ch]
> Gesendet: Dienstag, 13. Mai 2014 18:23
> An: java-user@lucene.apache.org
> Betreff: [lucene 4.6] NPE when calling IndexReader#openIfChanged
>
> I am facing the following stacktrace:
>         java.lang.NullPointerException: null
>           at java.io.File.<init>(File.java:305) ~[na:1.6.0_26]
>           at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:80)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.codecs.lucene40.BitVector.<init>(BitVector.java:327)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.codecs.lucene40.Lucene40LiveDocsFormat.readLiveDocs(Lucene40LiveDocsFormat.java:90)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:131)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:194)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:326)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader$2.doBody(StandardDirectoryReader.java:320)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:843)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader.doOpenFromCommit(StandardDirectoryReader.java:315)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader.doOpenNoWriter(StandardDirectoryReader.java:311)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:262)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:250)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>           at org.apache.lucene.index.DirectoryReader.openIfChanged(DirectoryReader.java:170)
~[lucene-core.jar:4.6.0 1543363 - simon - 2013-11-19 11:05:50]
>
> Unfortunately not always. Looks like j.i.File<init> is getting param child == null
What might go wrong in openIfChanged?
> Thanks for any advices/hints
> Clemens
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message