The Error
You reload your Opensolr Index (or upload new config files) and it fails with one of these errors:
org.apache.solr.common.SolrException: Unable to reload core [your_core] Caused by: Error loading solr config from .../solrconfig.xml Caused by: org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 13; Open quote is expected for attribute "name" associated with an element type "array".
Or:
ERROR XmlConfigFile:168 - Exception during parsing file: solrconfig.xml org.xml.sax.SAXParseException: Open quote is expected for attribute "name"
Or similar errors mentioning:
SAXParseExceptionOpen quote is expectedelement type is not closedThe element type must be terminatedContent is not allowed in prologUnexpected end of fileException during parsing file
All of these mean the same thing: your XML configuration file has a syntax error, and Solr cannot parse it.
What Is Actually Happening
Solr's configuration files (solrconfig.xml, schema.xml, search.xml, and all extras) are XML files. XML has very strict syntax rules — much stricter than HTML. A single missing quote, an unclosed tag, or a stray character will cause the entire file to be rejected.
When Solr tries to reload your index, it reads these XML files through a parser called SAX (Simple API for XML). If the parser hits invalid syntax, it throws a SAXParseException and the reload fails. Your index stays on the old configuration — nothing is broken, but the new config is not applied.
How to Read the Error Message
The SAXParseException error gives you everything you need to find the problem:
org.xml.sax.SAXParseException; systemId: solrres:/search.xml; ← THE FILE with the error lineNumber: 18; ← THE LINE number columnNumber: 13; ← THE COLUMN on that line Open quote is expected for ← WHAT is wrong attribute "name" associated with an element type "array".
In this example:
- The error is in search.xml (not solrconfig.xml — but referenced by it)
- On line 18, column 13
- The attribute
nameis missing its opening quote
Common Errors and Fixes
Missing or Wrong Quotes
The most common error. XML requires double quotes around attribute values.
<!-- WRONG — missing quotes --> <str name=myfield>value</str> <arr name=components> <!-- CORRECT — double quotes required --> <str name="myfield">value</str> <arr name="components">
Also watch for smart quotes (curly quotes) pasted from word processors or web pages:
<!-- WRONG — smart/curly quotes (look similar but are different characters!) --> <str name=\xe2\x80\x9cmyfield\xe2\x80\x9d>value</str> <!-- CORRECT — straight double quotes --> <str name="myfield">value</str>
Unclosed or Mismatched Tags
Every opening tag must have a matching closing tag with the exact same name.
<!-- WRONG — unclosed tag --> <str name="dir">${solr.ulog.dir:} <!-- WRONG — mismatched tags --> <str name="dir">${solr.ulog.dir:}</int> <!-- CORRECT --> <str name="dir">${solr.ulog.dir:}</str>
Unescaped Special Characters
XML has five characters that must be escaped when used inside values:
| Character | Escaped Form | Example |
|---|---|---|
& |
& |
rock & roll |
< |
< |
value < 100 |
> |
> |
value > 50 |
" |
" |
inside attributes |
' |
' |
inside attributes |
<!-- WRONG — unescaped ampersand --> <str name="q">rock & roll</str> <!-- CORRECT — escaped ampersand --> <str name="q">rock & roll</str>
Files Referenced by solrconfig.xml
The error might point to a file like search.xml, elevate.xml, or solrconfig_extra.xml. These are included by solrconfig.xml via <xi:include> directives. The syntax error is in that referenced file, not in solrconfig.xml itself.
Check the systemId in the error message to find the right file:
solrres:/search.xml→ editsearch.xmlsolrres:/schema.xml→ editschema.xmlsolrres:/solrconfig_extra.xml→ editsolrconfig_extra.xml
How to Fix It
Step 1: Identify the File and Line
Read the error message. It tells you the file name, line number, and column number.
Step 2: Open the File in the Config Editor
Go to your Opensolr Index Control Panel → Config Files Editor → select the file mentioned in the error.
Step 3: Go to the Exact Line
Navigate to the line number mentioned in the error. Look for:
- Missing or extra quotes
- Unclosed tags
- Unescaped
&,<, or>characters - Tags that open as one name and close as another
Step 4: Fix and Save
Correct the XML syntax error. Save the file.
Step 5: Reload
Click Reload in your Opensolr control panel. If the reload succeeds, the fix worked. If it fails again, read the new error message — there may be another syntax error on a different line.
How to Validate XML Before Uploading
Before uploading config files to Opensolr, validate them locally:
Using xmllint (Linux/Mac):
xmllint --noout solrconfig.xml # No output = valid XML # Error output = shows line and column of the problem
Online validators: Search for "XML validator online" — paste your XML and it will highlight syntax errors instantly.
Quick Checklist
- Read the error message — it tells you the file, line, and problem
- Check for missing quotes around attribute values (most common cause)
- Check for unclosed tags — every
<tag>needs a</tag> - Check for unescaped characters —
&must be&,<must be< - Watch for smart quotes from copy-paste — replace with straight
"quotes - If the error points to
search.xmlor*_extra.xml, edit that file, not solrconfig.xml - Use
xmllintto validate XML locally before uploading - Reload after fixing — if it succeeds, you are good
Having trouble finding the XML error? Reach out to us at support@opensolr.com with the error message — we will pinpoint and fix it for you.