Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6626

NPE in FieldMutatingUpdateProcessor when indexing a doc with null field value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.9
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      NullPointerException when indexing a JSON doc with null field.
      1. run the example-schemaless
      2. visit http://localhost:8983/solr/#/collection1/documents
      3. put a doc

      { "id":"fooop" }

      and it succeeds
      4. put a doc

      { "id":"fooop", "exampleField":null }

      and NPE is result.

      This could be considered a regression of SOLR-2714 which was resolved in v3.6, but the error occurs when the null-containing doc is added instead of during parsing.

      Stacktrace:

      ERROR org.apache.solr.servlet.SolrDispatchFilter – null:java.lang.NullPointerException
      at org.apache.solr.update.processor.FieldValueMutatingUpdateProcessor.mutate(FieldValueMutatingUpdateProcessor.java:65)
      at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:97)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
      at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:867)
      at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1021)
      at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:690)
      at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
      at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
      at org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:94)
      at org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:141)
      at org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:106)
      at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:68)
      at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:99)
      at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)

        Attachments

          Activity

            People

            • Assignee:
              noble.paul Noble Paul
              Reporter:
              pbaclace Paul Baclace
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: