Sunday, December 18, 2016

BPM: XPathFunctionException

Recently I faced below XPathFunctionException error, when I tried to build and execute SQL query in BPM process Script activity.

Error:
<Dec 12, 2016 6:47:14> <Error> <oracle.fabric.common.xml.xpath> <BEA-000000> <XPath function failed with error:oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.
oracle.fabric.common.xml.xpath.XPathFunctionException: oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.

<Dec 12, 2016 6:47:14> <Error> <oracle.soa.bpel.engine.xml> <BEA-000000> <
javax.xml.xpath.XPathExpressionException: internal xpath error


Fix:
Add alias to SQL query return value.

For Ex:

Incorrect: 
SELECT GET_STATUS('1234') FROM DUAL

Correct: added alias
SELECT GET_STATUS('1234') STATUS FROM DUAL


1 comment:

Provide your thoughts !