Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


Symptom

The sqlToParameters action fails with the following error: "The content of elements must consist of well-formed character data or markup".

Sample stack trace:

sqlToParametersWithInferiorOperator/SqlToParameters
org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 38; The content of elements must consist of well-formed character data or markup.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
    at com.indy.engine.actionCodes.sqlToParameters.getDocumentFromXmlPart(SourceFile:106)
    at com.indy.engine.actionCodes.sqlToParameters.executeSimpleCode(SourceFile:262)
    at com.indy.engine.action.common.ActionCodeTypeI.executeCode(SourceFile:1646)
    at com.indy.engine.action.common.ActionCodeTypeI.run(SourceFile:1805)
    at java.lang.Thread.run(Thread.java:745)

Solution

Your query expression might contain XML-specific characters, like "<" or ">".

Replace them with their entities: "&lt;" or "&gt;" respectively.

Sample expression:

<sqlToParameters>
<parameter name="/testHtml_${CORE_NAME}$" type="String">
select val from %x{$keyval/tech:physicalPath()}x%
where keycode &lt; 'toto'
limit 1
</parameter>
</sqlToParameters>

Knowledge Base

Suggest a new Article!