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

Add Detail To Configuration XML Parsing Error Messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.4
    • None
    • None
    • jdk 1.6+, Tomcat 5.x, 6.x

    Description

      When there is a parsing error in configuration xml files, the error message does not specify which file was being processed or what line caused the parse failure:

      === snip ===
      [Fatal Error] :33:54: The string "--" is not permitted within comments.
      Jan 27, 2009 6:07:54 PM org.apache.solr.common.SolrException log
      SEVERE: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
      at org.apache.solr.core.Config.<init>(Config.java:104)
      at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:111)
      at org.apache.solr.core.CoreContainer.create(CoreContainer.java:338)
      at org.apache.solr.core.CoreContainer.load(CoreContainer.java:217)
      === snip ===

      As a result, finding minor typos in the config files can take quite a bit of user time. In this case the specific error was an extraneous space in the closing xml comment tag, "-- >" instead of "-->".

      Attachments

        1. SOLR-991.patch
          1 kB
          Shalin Shekhar Mangar

        Activity

          People

            shalin Shalin Shekhar Mangar
            mhenson Michael Henson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: