Solr
  1. Solr
  2. SOLR-7574

NullPointerException in RequestUtil.mergeJSON

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.2.1
    • Component/s: None
    • Labels:
      None

      Description

      "Steps to reproduce"
      bin/solr start
      
      bin/solr create_core -c test
      
      curl -H 'Content-type: application/json' 'http://localhost:8983/solr/test/select?q=*:*&rows=10&wt=json'
      
      "Exception"
      ERROR - 2015-05-19 21:02:47.144; [   test] org.apache.solr.common.SolrException; null:java.lang.NullPointerException
              at org.apache.solr.request.json.ObjectUtil$ConflictHandler.mergeMap(ObjectUtil.java:60)
              at org.apache.solr.request.json.ObjectUtil.mergeObjects(ObjectUtil.java:114)
              at org.apache.solr.request.json.RequestUtil.mergeJSON(RequestUtil.java:259)
              at org.apache.solr.request.json.RequestUtil.processParams(RequestUtil.java:176)
              at org.apache.solr.util.SolrPluginUtils.setDefaults(SolrPluginUtils.java:166)
              at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140)
              at org.apache.solr.core.SolrCore.execute(SolrCore.java:1984)
      ...
      

      While there's no really any point in specifying content-type header with no content stream, but one can forget to remove this when trying different commands with curl / script.

      1. SOLR-7574.patch
        3 kB
        Yonik Seeley

        Issue Links

          Activity

          Hide
          Bill Bell added a comment -

          yeah this new behavior is breaking a ton of our code....

          Show
          Bill Bell added a comment - yeah this new behavior is breaking a ton of our code....
          Hide
          Bill Bell added a comment -

          Yonik ? Thoughts?

          Show
          Bill Bell added a comment - Yonik ? Thoughts?
          Hide
          Yonik Seeley added a comment -

          OK, lets see if we can get this fixed in time for 5.2.1

          Show
          Yonik Seeley added a comment - OK, lets see if we can get this fixed in time for 5.2.1
          Hide
          Yonik Seeley added a comment -

          OK, here's a patch.

          Show
          Yonik Seeley added a comment - OK, here's a patch.
          Hide
          ASF subversion and git services added a comment -

          Commit 1684458 from Yonik Seeley in branch 'dev/trunk'
          [ https://svn.apache.org/r1684458 ]

          SOLR-7574: fix NPE due to missing body with json content type

          Show
          ASF subversion and git services added a comment - Commit 1684458 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1684458 ] SOLR-7574 : fix NPE due to missing body with json content type
          Hide
          ASF subversion and git services added a comment -

          Commit 1684460 from Yonik Seeley in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684460 ]

          SOLR-7574: fix NPE due to missing body with json content type

          Show
          ASF subversion and git services added a comment - Commit 1684460 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684460 ] SOLR-7574 : fix NPE due to missing body with json content type
          Hide
          ASF subversion and git services added a comment -

          Commit 1684461 from Yonik Seeley in branch 'dev/branches/lucene_solr_5_2'
          [ https://svn.apache.org/r1684461 ]

          SOLR-7574: fix NPE due to missing body with json content type

          Show
          ASF subversion and git services added a comment - Commit 1684461 from Yonik Seeley in branch 'dev/branches/lucene_solr_5_2' [ https://svn.apache.org/r1684461 ] SOLR-7574 : fix NPE due to missing body with json content type

            People

            • Assignee:
              Yonik Seeley
              Reporter:
              Alexey Serba
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development