[ https://issues.apache.org/jira/browse/ODE-969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290103#comment-13290103 ]
Jayant Vaish commented on ODE-969: ---------------------------------- In org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException{ ..... try { someRes = evaluate(cexp, ctx, XPathConstants.NODESET); } catch (Exception e) { someRes = evaluate(cexp, ctx, XPathConstants.STRING); } .... } evaluate(cexp, ctx, XPathConstants.NODESET); is responsible to call the custom xpath function, but that function return type is not NodeList (For example it's return type is boolean). So, it throws exception: org.apache.ode.bpel.explang.EvaluationException: Error while executing an XPath expression: net.sf.saxon.trans.XPathException: Extension function required class org.w3c.dom.NodeList; supplied value of class net.sf.saxon.value.BooleanValue could not be converted. (As result is not able to converted into specified type i.e. NODESET) Then in the catch block it again call the custom xpath function. > Custom Xpath function executes twice. > ------------------------------------- > > Key: ODE-969 > URL: https://issues.apache.org/jira/browse/ODE-969 > Project: ODE > Issue Type: Bug > Components: BPEL Runtime > Reporter: Jayant Vaish > Priority: Critical > > Custom Xpath function executes twice because when it is called for first time > then it's return type is expected NodeSet. if it returns something else > exception is thrown and it is executed second time with expected return type > of String -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira