You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have integrated a custom XPath function and conducted unit testing using VS Code and Integration Studio on MI 4.3.0. During the execution of the unit tests, the following error occurred. However, when performing the integration tests on the same MI instance, we received a successful response.
[2024-12-04 15:49:07,103] ERROR {org.apache.synapse.util.xpath.SynapseXPath} - Evaluation of the XPath expression wso2:to-camelcase('testing from me') resulted in an error ; Line#: -1
net.sf.saxon.trans.XPathException: Namespace prefix 'wso2' has not been declared
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:311)
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:268)
at net.sf.saxon.expr.parser.XPathParser.resolveFunctionName(XPathParser.java:3431)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3231)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2226)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:2102)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:2021)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1983)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1997)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1850)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:752)
at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:657)
at net.sf.saxon.expr.parser.XPathParser.parse(XPathParser.java:519)
at net.sf.saxon.expr.parser.ExpressionTool.make(ExpressionTool.java:91)
at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:202)
at org.apache.synapse.util.xpath.SynapseXPath.evaluateDOMXPath(SynapseXPath.java:679)
at org.apache.synapse.util.xpath.SynapseXPath.stringValueOf(SynapseXPath.java:510)
at org.apache.synapse.mediators.builtin.PropertyMediator.getResultValue(PropertyMediator.java:425)
at org.apache.synapse.mediators.builtin.PropertyMediator.mediate(PropertyMediator.java:133)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:126)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:74)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.unittest.TestCasesMediator.sequenceMediate(TestCasesMediator.java:126)
at org.apache.synapse.unittest.TestingAgent.processTestCases(TestingAgent.java:290)
at org.apache.synapse.unittest.RequestHandler.runTestingAgent(RequestHandler.java:215)
at org.apache.synapse.unittest.RequestHandler.run(RequestHandler.java:83)
at java.base/java.lang.Thread.run(Thread.java:842)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: net.sf.saxon.trans.XPathException: Namespace prefix 'wso2' has not been declared
at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:212)
at org.apache.synapse.util.xpath.SynapseXPath.evaluateDOMXPath(SynapseXPath.java:679)
at org.apache.synapse.util.xpath.SynapseXPath.stringValueOf(SynapseXPath.java:510)
at org.apache.synapse.mediators.builtin.PropertyMediator.getResultValue(PropertyMediator.java:425)
at org.apache.synapse.mediators.builtin.PropertyMediator.mediate(PropertyMediator.java:133)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:126)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:74)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.unittest.TestCasesMediator.sequenceMediate(TestCasesMediator.java:126)
at org.apache.synapse.unittest.TestingAgent.processTestCases(TestingAgent.java:290)
at org.apache.synapse.unittest.RequestHandler.runTestingAgent(RequestHandler.java:215)
at org.apache.synapse.unittest.RequestHandler.run(RequestHandler.java:83)
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: net.sf.saxon.trans.XPathException: Namespace prefix 'wso2' has not been declared
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:311)
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:268)
at net.sf.saxon.expr.parser.XPathParser.resolveFunctionName(XPathParser.java:3431)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3231)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2226)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:2102)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:2021)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1983)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1997)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1850)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:752)
at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:657)
at net.sf.saxon.expr.parser.XPathParser.parse(XPathParser.java:519)
at net.sf.saxon.expr.parser.ExpressionTool.make(ExpressionTool.java:91)
at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:202)
... 12 more
Steps to Reproduce
N/A
Version
4.3.0
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered:
Description
We have integrated a custom XPath function and conducted unit testing using VS Code and Integration Studio on MI 4.3.0. During the execution of the unit tests, the following error occurred. However, when performing the integration tests on the same MI instance, we received a successful response.
[2024-12-04 15:49:07,103] ERROR {org.apache.synapse.util.xpath.SynapseXPath} - Evaluation of the XPath expression wso2:to-camelcase('testing from me') resulted in an error ; Line#: -1
net.sf.saxon.trans.XPathException: Namespace prefix 'wso2' has not been declared
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:311)
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:268)
at net.sf.saxon.expr.parser.XPathParser.resolveFunctionName(XPathParser.java:3431)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3231)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2226)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:2102)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:2021)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1983)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1997)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1850)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:752)
at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:657)
at net.sf.saxon.expr.parser.XPathParser.parse(XPathParser.java:519)
at net.sf.saxon.expr.parser.ExpressionTool.make(ExpressionTool.java:91)
at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:202)
at org.apache.synapse.util.xpath.SynapseXPath.evaluateDOMXPath(SynapseXPath.java:679)
at org.apache.synapse.util.xpath.SynapseXPath.stringValueOf(SynapseXPath.java:510)
at org.apache.synapse.mediators.builtin.PropertyMediator.getResultValue(PropertyMediator.java:425)
at org.apache.synapse.mediators.builtin.PropertyMediator.mediate(PropertyMediator.java:133)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:126)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:74)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.unittest.TestCasesMediator.sequenceMediate(TestCasesMediator.java:126)
at org.apache.synapse.unittest.TestingAgent.processTestCases(TestingAgent.java:290)
at org.apache.synapse.unittest.RequestHandler.runTestingAgent(RequestHandler.java:215)
at org.apache.synapse.unittest.RequestHandler.run(RequestHandler.java:83)
at java.base/java.lang.Thread.run(Thread.java:842)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: net.sf.saxon.trans.XPathException: Namespace prefix 'wso2' has not been declared
at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:212)
at org.apache.synapse.util.xpath.SynapseXPath.evaluateDOMXPath(SynapseXPath.java:679)
at org.apache.synapse.util.xpath.SynapseXPath.stringValueOf(SynapseXPath.java:510)
at org.apache.synapse.mediators.builtin.PropertyMediator.getResultValue(PropertyMediator.java:425)
at org.apache.synapse.mediators.builtin.PropertyMediator.mediate(PropertyMediator.java:133)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:126)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:74)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.unittest.TestCasesMediator.sequenceMediate(TestCasesMediator.java:126)
at org.apache.synapse.unittest.TestingAgent.processTestCases(TestingAgent.java:290)
at org.apache.synapse.unittest.RequestHandler.runTestingAgent(RequestHandler.java:215)
at org.apache.synapse.unittest.RequestHandler.run(RequestHandler.java:83)
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: net.sf.saxon.trans.XPathException: Namespace prefix 'wso2' has not been declared
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:311)
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:268)
at net.sf.saxon.expr.parser.XPathParser.resolveFunctionName(XPathParser.java:3431)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3231)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2226)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:2102)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:2021)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1983)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1997)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1850)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:752)
at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:657)
at net.sf.saxon.expr.parser.XPathParser.parse(XPathParser.java:519)
at net.sf.saxon.expr.parser.ExpressionTool.make(ExpressionTool.java:91)
at net.sf.saxon.xpath.XPathEvaluator.compile(XPathEvaluator.java:202)
... 12 more
Steps to Reproduce
N/A
Version
4.3.0
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: