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

NPE in /admin/field with no parameters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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.

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: