Solr
  1. Solr
  2. SOLR-1097

XmlUpdateRequestHandler gives NPE on wellformed but incorrect XML

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: update
    • Labels:
      None

      Description

      XmlUpdateRequestHandler has some really bad behavior when you send it Valid XML, but with elements that aren't what it's expecting. we should add some more "error case" tests and make sure we're returning useful error messages.

        Activity

        Hide
        Erick Erickson added a comment -

        Just tried it in 4x, get message
        Unexpected <doc> tag without an <add> tag surrounding it.

        Show
        Erick Erickson added a comment - Just tried it in 4x, get message Unexpected <doc> tag without an <add> tag surrounding it.
        Hide
        Hoss Man added a comment -

        for example, a user was sending a valid <doc>...</doc>, but it wasn't wrapped in an <add> ...

        http://www.nabble.com/Solrj-exception-posting-XML-docs-to22740509.html#a22740509

        13:12:09,119 ERROR [STDERR] Mar 27, 2009 1:12:09 PM
        org.apache.solr.common.SolrException log
        SEVERE: java.lang.NullPointerException
         at
        org.apache.solr.handler.XmlUpdateRequestHandler.processUpdate(XmlUpdateRequestHandler.java:194)
         at
        org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRequestHandler.java:1
        23)
         at
        org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
        
        Show
        Hoss Man added a comment - for example, a user was sending a valid <doc>...</doc>, but it wasn't wrapped in an <add> ... http://www.nabble.com/Solrj-exception-posting-XML-docs-to22740509.html#a22740509 13:12:09,119 ERROR [STDERR] Mar 27, 2009 1:12:09 PM org.apache.solr.common.SolrException log SEVERE: java.lang.NullPointerException at org.apache.solr.handler.XmlUpdateRequestHandler.processUpdate(XmlUpdateRequestHandler.java:194) at org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRequestHandler.java:1 23) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)

          People

          • Assignee:
            Unassigned
            Reporter:
            Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development