Welcome Guest! Log in
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.


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>

You have no rights to post comments

Knowledge Base

Suggest a new Article!