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

NullPointerException in org/apache/solr/handler/component/StatsField.java[251]

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: main (9.0)
    • Fix Version/s: 8.2
    • 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?stats=true&stats.field={!cardinalit}
      

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

      ERROR (qtp689401025-17) [   x:films] o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
      	at org.apache.solr.handler.component.StatsField.<init>(StatsField.java:251)
      	at org.apache.solr.handler.component.StatsInfo.<init>(StatsComponent.java:194)
      	at org.apache.solr.handler.component.StatsComponent.prepare(StatsComponent.java:47)
      	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:272)
      	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 'createParser' on local variable 'qplug' which is set to null on the previous line (i.e. 250). The value null is set to the local variable 'qplug', because of failure in finding the sting "cardinalit" in the field 'registry' of the class org.apache.solr.core.PluginBag (at line org/apache/solr/core/PluginBag.java[167]).

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

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              munendrasn Munendra S N
              Reporter:
              marek.trtik Marek

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment