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

NPE in /admin/field with no parameters

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.7.2, 4.8
    • 4.8.1, 4.9, 6.0
    • Schema and Analysis
    • 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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shalin Shalin Shekhar Mangar
            shalin Shalin Shekhar Mangar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment