lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sale, Doug" <ds...@us.britannica.com>
Subject RE: IndexWriter addDocument NullPointerException
Date Fri, 21 Feb 2003 20:43:20 GMT
if you're expecting help, you're going to have to be more thorough.  full
code.  version of lucene.  doc examples that cause problems.  otherwise, i'm
guessing you'll watch this list and not see any more responses...

truthfully yours,
doug

> -----Original Message-----
> From: Günter Kukies [mailto:guenter.kukies@heuft.com]
> Sent: Friday, February 21, 2003 2:22 PM
> To: lucene-user@jakarta.apache.org
> Subject: Re: IndexWriter addDocument NullPointerException
> 
> 
> Hello,
> 
> I don't have any line number.
> 
> this is the code snippet:
> 
> Document doc;
> IndexWriter writer;
> 
> .....
> 
> try{
> writer.addDocument(doc);
> }
> catch(Exception ex){
> ex.printStackTrace();
> }
> 
> this is the output on Standard.out:
> 
> java.lang.NullPointerException
> 
> 
> and nothing more.
> 
> The doc is not null and System.out.println(doc) seems to be 
> ok. There is
> no difference between the working 80% and the not working 20% doc's.
> Thanks,
> 
> Günter
> 
> 
> 
> > On Friday 21 February 2003 05:33, Günter Kukies wrote:
> >> Hello,
> >>
> >> writer.addDocument(doc) is throwing an NullPointerException. The
> >> stacktrace from the catched Exception is only one line
> >> "NullPointerException" without anything else. I open the 
> IndexWriter
> >> with create true. Run over the files in a Directory and 
> add all found
> >> documents. After that i close the indexwriter. 80% of the documents
> >> were added without problems. The rest gets that 
> NullPointerException.
> >>
> >> Any Ideas?
> >
> > Perhaps look at the line where the null pointer exception 
> is thrown and
> > see  what happens? NullPointerException is thrown when a 
> null reference
> > is being  de-referenced. Seeing the immediate cause should be easy,
> > given line number.
> >
> > Perhaps you have added a field with null value? (just a 
> guess, I don't
> > know if  that's even illegal).
> >
> > -+ Tatu +-
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: 
> lucene-user-unsubscribe@jakarta.apache.org For
> > additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message