lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Null Pointer Exception without details on Update in schemaless 7.4
Date Thu, 06 Sep 2018 04:25:22 GMT
On 9/5/2018 8:32 PM, deniz wrote:
> I have set up a schemaless solr (cloud) and have been trying to test the
> updates. as DIH is not going through field guessing, I have wrote a small
> piece of code to query data from db and push the docs to solr...
> Once the client pushes the docs to solr, on server there are npe logs as
> below:
> o.a.s.h.RequestHandlerBase java.lang.NullPointerException
>    at
> org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.mapValueClassesToFieldType(

Your client-side log indicated the SolrJ version, but you did not say 
which version of Solr you're running on the server.

If the server version is also 7.4.0, then my examination of the source 
code will be accurate.  It seems that when the 
AddSchemaFieldsUpdateProcessorFactory class is looping through the 
fields that it found in the input document, one of them is the java 
'null' value instead of an instance of the SolrInputField class. Thus 
when the code tries to call the "getValues()" method (line 509) on the 
field object, Java throws NullPointerException.

I do not know what could result in a null value like that, or whether 
SolrInputDocument needs some kind of safety check to make sure a null 
SolrInputField is not possible.

If the server version isn't 7.4.0, then I cannot be 100 percent certain 
about what's happening, because the code could be different in that version.


View raw message