lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From petite_abeille <petite_abei...@mac.com>
Subject Weird NPE in RAMInputStream when merging indices
Date Tue, 21 Oct 2003 16:56:29 GMT
Hello,

What could cause such weird exception?

RAMInputStream.<init>: java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.lucene.store.RAMInputStream.<init>(RAMDirectory.java:217)
at org.apache.lucene.store.RAMDirectory.openFile(RAMDirectory.java:182)
at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:78)
at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:116)
at 
org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:378)
at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:298)
at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:313)

I don't know if this is a one off as I cannot reproduce this problem 
nor I have seen this before, but I thought I could as well ask.

This is triggered by merging a RAMDirectory into a FSDirectory. Looking 
at the RAMDirectory source code, this exception seems to indicate that 
the file argument to the RAMInputStream constructor is null... how 
could that ever happen?

Here is the code which triggers this weirdness:

     this.writer().addIndexes( new Directory[] { aRamDirectory } );

The RAM writer is checked before invoking this code to make sure there 
is some content in the RAM directory:

     aRamWriter.docCount() > 0

This has been working very reliably since the dawn of time, so I'm a 
little bit at loss as how to diagnose this weird exception...

Any ideas?

Thanks.

Cheers,

PA.


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


Mime
View raw message