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

NullPointerException at o.a.solr.search.QParser.getParser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.0
    • 8.2
    • None

    Description

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

      http://localhost:8983/solr/films/select?fq={!a}
      

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

      java.lang.NullPointerException
      	at org.apache.solr.search.QParser.getParser(QParser.java:367)
      	at org.apache.solr.search.QParser.getParser(QParser.java:319)
      	at org.apache.solr.search.QParser.getParser(QParser.java:309)
      	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:203)
      	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)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
      [...]
      

      The call to getQueryPlugin from org.apache.solr.search.QParser.getParser(), at line 366, can return a null pointer, as witnessed by the URL above. Method getParser should probably check for this.

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

      Attachments

        1. home.zip
          376 kB
          Cesar Rodriguez
        2. SOLR-13187.patch
          5 kB
          Charles Sanders
        3. SOLR-13187.patch
          5 kB
          Munendra S N
        4. SOLR-13187.patch
          8 kB
          Munendra S N

        Issue Links

          Activity

            People

              munendrasn Munendra S N
              cesar.rodriguez Cesar Rodriguez
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: