Hi, Eric, I think I have the same problem. I found out in latest MultiReader.java, the "SegmentInfos" is set to null.
public MultiReader(IndexReader[] subReaders) throws IOException { super(subReaders.length == 0 ? null : subReaders[0].directory(), null, false, subReaders); } However, segmentInfos are used in several places, causing NPEs. For example, in IndexReader.acquireWriteLock(), if (SegmentInfos.readCurrentVersion(directory) > segmentInfos.getVersion()) { So I think MultiReader.java need some adjustments. -- Chris Lu ------------------------- Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com Lucene Database Search in 3 minutes: http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes On 8/21/07, Michael Busch <[EMAIL PROTECTED] > wrote: > > Eric Louvard wrote: > > Hello while calling IndexReader.deletedoc(int) I am becomming a NPE. > > > > java.lang.NullPointerException > > at > > org.apache.lucene.index.IndexReader.acquireWriteLock(IndexReader.java > :658) > > at > > org.apache.lucene.index.IndexReader.deleteDocument (IndexReader.java > :686) > > > > In the acquireWriteLock methode there is call > > 'segmentInfos.getVersion()', but segmentInfos should be 'null'. > > > > I am working with the head revision from SVN. > > > > May someone tell me a work arround. > > > > regards, Éric Louvard. > > > > Hi Eric, > > could you please provide more information about how exactly you create > the IndexReader? A unit test that hits this exception would be even > better! > > Thanks, > - Michael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >