[Oracle BPM] oracle.xml.sql.OracleXMLSQLException exception

If you get an oracle.xml.sql.OracleXMLSQLException exception while using xpath expression in Oracle BPM Suite just follow the solution that you can find blow 🙂

Error message;
An error occurs while processing the XPath expression; the expression is oraext:query-database(concat(concat(‘SELECT get_xxx (‘,/task:task/task:payload/ns2:abc/ns2:def/ns2:gh),’) FROM DUAL’) ,false(),false(),’jdbc/abcdeDS’).
The XPath expression failed to execute; the reason was: oracle.xml.sql.OracleXMLSQLException: Character ‘)’ is not allowed in an XML tag name..
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
The XPath expression failed to execute; the reason was: oracle.xml.sql.OracleXMLSQLException: Character ‘)’ is not allowed in an XML tag name

Just give an ALIAS to your select. I mean;

instead of
oraext:query-database(concat(concat(‘SELECT get_xxx (‘,/task:task/task:payload/ns2:abc/ns2:def/ns2:gh),’) FROM DUAL’)
use
oraext:query-database(concat(concat(‘SELECT get_xxx (‘,/task:task/task:payload/ns2:abc/ns2:def/ns2:gh),’) xxx FROM DUAL’)