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

org.apache.solr.servlet.HttpSolrCall.getAuthCtx().new AuthorizationContext() {...}.getParams() sometimes throw java.lang.NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.6, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None
    • Environment:

      solrcloud 5.5.3

      Description

      Sometimes solrReq in HttpSolrCall is null, causing a NullPointerException. See the following log:

      2017-05-08 16:05:30,221 ERROR org.apache.solr.servlet.HttpSolrCall: null:java.lang.NullPointerException
      at org.apache.solr.servlet.HttpSolrCall$2.toString(HttpSolrCall.java:1001)
      at java.lang.String.valueOf(String.java:2854)
      at java.lang.StringBuilder.append(StringBuilder.java:128)
      at org.apache.ranger.authorization.solr.authorizer.RangerSolrAuthorizer.authorize(RangerSolrAuthorizer.java:231)
      at org.apache.ranger.authorization.solr.authorizer.RangerSolrAuthorizer.authorize(RangerSolrAuthorizer.java:128)
      at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:422)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:279)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:230)
      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:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      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:861)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:745)

        Activity

        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        I think there might be a bug in Apache Ranger's solr plugin which shows up in your stack trace so I request you to report this exception to them as well – see https://issues.apache.org/jira/browse/RANGER

        However, we shouldn't be throwing an NPE so I'll fix it in Solr anyway.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - I think there might be a bug in Apache Ranger's solr plugin which shows up in your stack trace so I request you to report this exception to them as well – see https://issues.apache.org/jira/browse/RANGER However, we shouldn't be throwing an NPE so I'll fix it in Solr anyway.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 54061ed4a6c1ed9b60e08056577fac702c6816bd in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=54061ed ]

        SOLR-10630: HttpSolrCall.getAuthCtx().new AuthorizationContext()

        {...}

        .getParams() sometimes throws java.lang.NullPointerException

        Show
        jira-bot ASF subversion and git services added a comment - Commit 54061ed4a6c1ed9b60e08056577fac702c6816bd in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=54061ed ] SOLR-10630 : HttpSolrCall.getAuthCtx().new AuthorizationContext() {...} .getParams() sometimes throws java.lang.NullPointerException
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 622f9a4db1922486b5db8040d135ee1c38d44dd5 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=622f9a4 ]

        SOLR-10630: HttpSolrCall.getAuthCtx().new AuthorizationContext()

        {...}

        .getParams() sometimes throws java.lang.NullPointerException

        (cherry picked from commit 54061ed)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 622f9a4db1922486b5db8040d135ee1c38d44dd5 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=622f9a4 ] SOLR-10630 : HttpSolrCall.getAuthCtx().new AuthorizationContext() {...} .getParams() sometimes throws java.lang.NullPointerException (cherry picked from commit 54061ed)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Thanks Hu Xiaodong!

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Thanks Hu Xiaodong!

          People

          • Assignee:
            shalinmangar Shalin Shekhar Mangar
            Reporter:
            xiaodong.hu hu xiaodong
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development