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

NullPointerException in ConcurrentHashMap caused by passing null to get mmethod in org/apache/solr/schema/IndexSchema.java[1201]

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: master (9.0)
    • Fix Version/s: 8.1, master (9.0)
    • Component/s: None
    • Labels:
    • Environment:

      Description

      Requesting the following URL causes Solr to return an HTTP 500 error response:

      http://localhost:8983/solr/films/select?q=initial_release_date:[*%20TO%20NOW-18YEAR]&wt=php&json.facet.facet.field=2
      

      The error response seems to be caused by the following uncaught exception:

      ERROR (qtp689401025-19) [   x:films] o.a.s.h.RequestHandlerBase java.lang.NullPointerException
      	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
      	at org.apache.solr.schema.IndexSchema.getFieldOrNull(IndexSchema.java:1201)
      	at org.apache.solr.schema.IndexSchema.getField(IndexSchema.java:1225)
      	at org.apache.solr.search.facet.FacetField.createFacetProcessor(FacetField.java:118)
      	at org.apache.solr.search.facet.FacetRequest.process(FacetRequest.java:397)
      	at org.apache.solr.search.facet.FacetProcessor.processSubs(FacetProcessor.java:472)
      	at org.apache.solr.search.facet.FacetProcessor.fillBucket(FacetProcessor.java:429)
      	at org.apache.solr.search.facet.FacetQueryProcessor.process(FacetQuery.java:64)
      	at org.apache.solr.search.facet.FacetRequest.process(FacetRequest.java:401)
      	at org.apache.solr.search.facet.FacetModule.process(FacetModule.java:139)
      	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
      	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
      	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2559)
      	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:711)
      	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516)
      	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:394)
      	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:340)
      	[...]
      

      There is called method 'get' on the member 'org.apache.solr.schema.IndexSchema.dynamicFieldCache' (which os a 'ConcurrentHashMap') with null as an argument; that leads to a crash inside 'get' method. The null value (passed to 'get' method) comes from from member 'field' of 'org.apache.solr.search.facet.FacetField' instance' at org/apache/solr/search/facet/FacetField.java[118].

      We found this bug using Diffblue Microservices Testing. Find more information on this fuzz testing campaign.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marek.trtik Marek
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: