You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Richard Belanger <rb...@forrester.com> on 2002/09/19 23:37:43 UTC

Problem with addDocument returning java.lang.NullPointerException

Hello:

I am building a Lucene application and I am getting a NullPointerException
when calling addDocument.  Invoking the toString method on my Document jst
before the addDocument call gives:

Document<Te...@5>
Keyword<modified:0d4nk0hs0> Text<title:Millionaires Last Hope For
Telematics> Text<path:\PDFDirectory\2002\Millionaires Last Hope For
Telematics.pdf>>

Which seems to be ok.  Commenting out individual fields seems to make no
difference.  Any suggestions of what I could be doing wrong would be
appreciated.

Rich

Richard C. Belanger
Chief Technology Officer
Forrester Research
400 Technology Square
Cambridge, MA 02139

rbelanger@forrester.com
http://www.forrester.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with addDocument returning java.lang.NullPointerException

Posted by Terry Steichen <te...@net-frame.com>.
Richard,

You need to provide a bit more info before anyone (or, more specifically, I)
will be able to assist you.  I infer from what you've said that your source
documents are PDF?  What sort of Document class are you using?  If you
aren't checking for null fields, the sort of behavior you're describing is
inevitable.

Regards,

Terry

----- Original Message -----
From: "Richard Belanger" <rb...@forrester.com>
To: <lu...@jakarta.apache.org>
Sent: Thursday, September 19, 2002 5:37 PM
Subject: Problem with addDocument returning java.lang.NullPointerException


> Hello:
>
> I am building a Lucene application and I am getting a NullPointerException
> when calling addDocument.  Invoking the toString method on my Document jst
> before the addDocument call gives:
>
> Document<Te...@5>
> Keyword<modified:0d4nk0hs0> Text<title:Millionaires Last Hope For
> Telematics> Text<path:\PDFDirectory\2002\Millionaires Last Hope For
> Telematics.pdf>>
>
> Which seems to be ok.  Commenting out individual fields seems to make no
> difference.  Any suggestions of what I could be doing wrong would be
> appreciated.
>
> Rich
>
> Richard C. Belanger
> Chief Technology Officer
> Forrester Research
> 400 Technology Square
> Cambridge, MA 02139
>
> rbelanger@forrester.com
> http://www.forrester.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>