Solr
  1. Solr
  2. SOLR-6023

NPE in /admin/field with no parameters

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7.2, 4.8
    • Fix Version/s: 4.8.1, 4.9, 6.0
    • Component/s: Schema and Analysis
    • Labels:
      None

      Description

      Send a request to /field/analysis with the example jetty and you get a NPE

      Request:

      http://localhost:8983/solr/collection1/analysis/field
      
      <response>
      <lst name="responseHeader"><int name="status">500</int><int name="QTime">2</int></lst><lst name="error"><str name="trace">java.lang.NullPointerException
      	at org.apache.solr.schema.IndexSchema$DynamicReplacement$DynamicPattern$NameEndsWith.matches(IndexSchema.java:983)
      	at org.apache.solr.schema.IndexSchema$DynamicReplacement.matches(IndexSchema.java:997)
      	at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1244)
      	at org.apache.solr.schema.IndexSchema.getFieldType(IndexSchema.java:1198)
      	at org.apache.solr.handler.FieldAnalysisRequestHandler.handleAnalysisRequest(FieldAnalysisRequestHandler.java:189)
      	at org.apache.solr.handler.FieldAnalysisRequestHandler.doAnalysis(FieldAnalysisRequestHandler.java:101)
      	at org.apache.solr.handler.AnalysisRequestHandlerBase.handleRequestBody(AnalysisRequestHandlerBase.java:60)
      	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      	at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:241)
      	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1962)
      	at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
      </str><int name="code">500</int></lst>
      </response>
      

      We should fix it to return a proper BAD_REQUEST error message.

      1. SOLR-6023.patch
        3 kB
        Shalin Shekhar Mangar

        Issue Links

          Activity

          Hide
          Shalin Shekhar Mangar added a comment -

          Fix + test

          Show
          Shalin Shekhar Mangar added a comment - Fix + test
          Hide
          ASF subversion and git services added a comment -

          Commit 1592195 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1592195 ]

          SOLR-6023: FieldAnalysisRequestHandler throws NPE if no parameters are supplied

          Show
          ASF subversion and git services added a comment - Commit 1592195 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1592195 ] SOLR-6023 : FieldAnalysisRequestHandler throws NPE if no parameters are supplied
          Hide
          ASF subversion and git services added a comment -

          Commit 1592196 from shalin@apache.org in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1592196 ]

          SOLR-6023: FieldAnalysisRequestHandler throws NPE if no parameters are supplied

          Show
          ASF subversion and git services added a comment - Commit 1592196 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1592196 ] SOLR-6023 : FieldAnalysisRequestHandler throws NPE if no parameters are supplied
          Hide
          ASF subversion and git services added a comment -

          Commit 1592821 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_8'
          [ https://svn.apache.org/r1592821 ]

          Merge back several "low hanging" bug fixes into the 4.8 branch...
          SOLR-6029: r1590867
          SOLR-6030: r1591555
          SOLR-6037: r1591800
          SOLR-6023: r1592195
          SOLR-5090: r1592591
          SOLR-6039: r1592605
          SOLR-5993: r1588415
          SOLR-5904: r1587702

          Show
          ASF subversion and git services added a comment - Commit 1592821 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1592821 ] Merge back several "low hanging" bug fixes into the 4.8 branch... SOLR-6029 : r1590867 SOLR-6030 : r1591555 SOLR-6037 : r1591800 SOLR-6023 : r1592195 SOLR-5090 : r1592591 SOLR-6039 : r1592605 SOLR-5993 : r1588415 SOLR-5904 : r1587702

            People

            • Assignee:
              Shalin Shekhar Mangar
              Reporter:
              Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development