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

NullPointerException in JSON Facet if omitHeaders=true

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.1.1
    • Fix Version/s: 8.2
    • Component/s: Facet Module
    • Labels:
      None
    • Environment:

      Description

      The error exists in Solr 8.1.1 and didn't occur in Solr 8.0 and 7.x.

      Running this simple JSON Facet against the techproducts example (in cloud mode) succeeds as expected:

      curl http://localhost:8983/solr/techproducts/select -d '
      q=*:*&
      omitHeader=false&
      json.facet={
        "max_price" : "max(price)"
      }

      But as soon you omit Headers it results in a NullPointerException (which didn't happen in earlier Solr versions):

      curl http://localhost:8983/solr/techproducts/select -d '
      q=*:*&
      omitHeader=true&
      json.facet={
        "max_price" : "max(price)"
      }'
      

      Exception:

      2019-06-03 12:40:11.446 ERROR (qtp67730604-361) [c:techproducts s:shard2 r:core_node7 x:techproducts_shard2_replica_n4] o.a.s.h.RequestHandlerBase java.lang.NullPointerException
          at org.apache.solr.search.facet.FacetModule.handleResponses(FacetModule.java:284)
          at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:423)
          at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
          at org.apache.solr.core.SolrCore.execute(SolrCore.java:2566)
          at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:756)
          at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:542)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:397)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
          at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
          at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
          at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
          at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
          at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
          at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
          at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
          at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
          at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          at org.eclipse.jetty.server.Server.handle(Server.java:502)
          at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
          at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
          at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
          at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
          at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
          at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
          at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
          at java.base/java.lang.Thread.run(Thread.java:834)
      
      2019-06-03 12:40:11.447 INFO  (qtp67730604-361) [c:techproducts s:shard2 r:core_node7 x:techproducts_shard2_replica_n4] o.a.s.c.S.Request [techproducts_shard2_replica_n4]  webapp=/solr path=/select params={q=*:*&json.facet={%0a++"max_price"+:+"max(price)"%0a}&omitHeader=true} hits=32 status=500 QTime=11
      2019-06-03 12:40:11.447 ERROR (qtp67730604-361) [c:techproducts s:shard2 r:core_node7 x:techproducts_shard2_replica_n4] o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
          at org.apache.solr.search.facet.FacetModule.handleResponses(FacetModule.java:284)
          at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:423)
          at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
          at org.apache.solr.core.SolrCore.execute(SolrCore.java:2566)
          at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:756)
          at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:542)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:397)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
          at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
          at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
          at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
          at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
          at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
          at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
          at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
          at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
          at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
          at org.eclipse.jetty.server.Server.handle(Server.java:502)
          at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
          at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
          at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
          at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
          at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
          at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
          at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
          at java.base/java.lang.Thread.run(Thread.java:834)
      
      

       

        Attachments

        1. SOLR-13509.patch
          0.7 kB
          Munendra S N
        2. SOLR-13509.patch
          2 kB
          Munendra S N
        3. SOLR-13509.patch
          8 kB
          Munendra S N
        4. SOLR-13509.patch
          8 kB
          Munendra S N
        5. SOLR-13509.patch
          13 kB
          Mikhail Khludnev

          Issue Links

            Activity

              People

              • Assignee:
                mkhl Mikhail Khludnev
                Reporter:
                mkalkbrenner Markus Kalkbrenner
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: