lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Bug: RAMDirectory: line 158 - NPE
Date Tue, 27 Nov 2001 07:06:08 GMT

--- Otis Gospodnetic <otis_gospodnetic@yahoo.com> wrote:
> Hello,
> 
> I'm getting the following exception when using RAMDirectory:
> 
> Exception in thread "main" java.lang.NullPointerException
> 	at
> org.apache.lucene.store.RAMInputStream.<init>(RAMDirectory.java:158)
> 	at
> org.apache.lucene.store.RAMDirectory.openFile(RAMDirectory.java:123)
> 	at 
> ...
> ...
> 
> I'm using the stuff from CVS.
> Attached is a standalone example that causes this Exception to be
> thrown.
> 
> The file on line 153 on which '.length' is being called at line 123
> is
> null for some reason...
> 
> Am I doing something wrong?

Yes, you are closing writers in flush() method and then adding
documents to them, etc.

Otis

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message