lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: about NullPointerException in DocumentsWriter$ThreadState.init(DocumentsWriter.java:751)
Date Fri, 11 Apr 2008 11:43:46 GMT

I think this is something you just shouldn't do?

Ie, if you call Document.addField(null), it is silently accepted and  
then causes that exception when added the document, but my feeling is  
you shouldn't do that.

Mike

kai.hu wrote:
>
> i got a problem yesterday,
> java.lang.NullPointerException
> at org.apache.lucene.index.DocumentsWriter$ThreadState.init 
> (DocumentsWriter.java:751)
> at org.apache.lucene.index.DocumentsWriter.getThreadState 
> (DocumentsWriter.java:2391)
> at org.apache.lucene.index.DocumentsWriter.updateDocument 
> (DocumentsWriter.java:2434)
> at org.apache.lucene.index.DocumentsWriter.addDocument 
> (DocumentsWriter.java:2422)
> at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java: 
> 1445)
> at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java: 
> 1424)
>
> so i debug the code ,found if the document add a null Field,it will  
> throw this Exception.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Mime
View raw message