Solr
  1. Solr
  2. SOLR-1753

StatsComponent throws java.lang.NullPointerException when getting statistics for facets in distributed search

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5, 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows

      Description

      When using the StatsComponent with a sharded request and getting statistics over facets, a NullPointerException is thrown.

      Stacktrace:
      java.lang.NullPointerException at org.apache.solr.handler.component.StatsValues.accumulate(StatsValues.java:54) at
      org.apache.solr.handler.component.StatsValues.accumulate(StatsValues.java:82) at
      org.apache.solr.handler.component.StatsComponent.handleResponses(StatsComponent.java:116) at
      org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:290) at
      org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at
      org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Unknown Source)

      1. SOLR-1753.patch
        0.8 kB
        Janne Majaranta

        Activity

        Hide
        Janne Majaranta added a comment -

        The attached patch seems to fix the issue.

        Seems a bit too easy however. Am I missing something ?

        Show
        Janne Majaranta added a comment - The attached patch seems to fix the issue. Seems a bit too easy however. Am I missing something ?
        Hide
        Koji Sekiguchi added a comment -

        Patch looks good! Will commit shortly.

        Show
        Koji Sekiguchi added a comment - Patch looks good! Will commit shortly.
        Hide
        Koji Sekiguchi added a comment -

        Committed revision 906781. Thanks Janne!

        Show
        Koji Sekiguchi added a comment - Committed revision 906781. Thanks Janne!
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release

          People

          • Assignee:
            Koji Sekiguchi
            Reporter:
            Janne Majaranta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development