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

fix TopGroupsShardResponseProcessor.java:105 NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.5.2, 5.6, 6.0.1, 6.1, 7.0
    • None
    • None

    Description

      e.g. http://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/16693/testReport/junit/org.apache.solr/TestDistributedSearch/test/

      org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:44706//collection1: java.lang.NullPointerException
      	at org.apache.solr.search.grouping.distributed.responseprocessor.TopGroupsShardResponseProcessor.process(TopGroupsShardResponseProcessor.java:105)
      	at org.apache.solr.handler.component.QueryComponent.handleGroupedResponses(QueryComponent.java:753)
      	at org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:736)
      	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:420)
      	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)
      	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2016)
      ...
      

      A minimalistic fix would be

      -          if (t instanceof SolrServerException) {
      +          if (t instanceof SolrServerException && t.getCause() != null) {
      

      but perhaps equally valid would be to tweak the logic, similar to the SearchHandler.java#L440 logic, the difference being cause vs. root-cause for SolrServerException exceptions and throwable vs. throwable.cause for other exceptions.

      Attachments

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              cpoerschke Christine Poerschke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m