> Are you using doc-values updates? Not to my knowledge, i.e. not explicitly
> Are you ever removing files directly from the index directory yourself > between reopens? Yes. Reindexing an index completely(*) is done in a separate temporary index/folder. After that we (guarded by a mutex) swap the files, i.e. delete the old ones and then move over the new index files. (*)we do this for example after a massimport of index-relevant data (instead of updating each and every element on ist own). -----Ursprüngliche Nachricht----- Von: Michael McCandless [mailto:luc...@mikemccandless.com] Gesendet: Montag, 19. Mai 2014 10:44 An: Lucene Users Betreff: Re: [lucene 4.6] NPE when calling IndexReader#openIfChanged Hmm, I was wrong before, the code is more complex than I thought. Are you using doc-values updates? Can you describe a bit more how your app works? Are you ever removing files directly from the index directory yourself between reopens? Mike McCandless http://blog.mikemccandless.com On Mon, May 19, 2014 at 1:36 AM, Clemens Wyss DEV <clemens...@mysign.ch> wrote: > Sorry for being imprecise > java version "1.6.0_26" > Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) > 64-Bit Server VM (build 20.1-b02, mixed mode) > > - Clemens > -----Ursprüngliche Nachricht----- > Von: Michael McCandless [mailto:luc...@mikemccandless.com] > Gesendet: Sonntag, 18. Mai 2014 16:51 > An: Lucene Users > Betreff: Re: [lucene 4.6] NPE when calling IndexReader#openIfChanged > > But what is the output of "java -fullversion"? > > Mike McCandless > > http://blog.mikemccandless.com > > On Sun, May 18, 2014 at 5:24 AM, Clemens Wyss DEV <clemens...@mysign.ch> > wrote: >>> What java version? >> We are still on (1.)6 >> >> -----Ursprüngliche Nachricht----- >> Von: Michael McCandless [mailto:luc...@mikemccandless.com] >> Gesendet: Donnerstag, 15. Mai 2014 11:43 >> An: Lucene Users >> Betreff: Re: [lucene 4.6] NPE when calling IndexReader#openIfChanged >> >> 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 <clemens...@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:clemens...@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-unsubscr...@lucene.apache.org >>> For additional commands, e-mail: java-user-h...@lucene.apache.org >>> >>> >>> -------------------------------------------------------------------- >>> - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >>> For additional commands, e-mail: java-user-h...@lucene.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org