Default transform factory of saxon has been switched to Xalan in later releases.
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 99
- Forks
- 708
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 22
Description
Description:
When there is an XSLT mediator in the mediation sequence we can observe the below ERROR while invoking that API.
TID: [36] [] [2021-06-08 21:41:47,551] ERROR {org.apache.synapse.mediators.transform.XSLTMediator} - Fatal error occurred in stylesheet parsing. ; Line#: 91; Column#: 60
javax.xml.transform.TransformerException: Could not find function: ends-with
at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:610)
at org.apache.xpath.compiler.XPathParser.FunctionCall(XPathParser.java:1507)
at org.apache.xpath.compiler.XPathParser.PrimaryExpr(XPathParser.java:1446)
This was working fine in APIM 2.6.0. (when trying this out locally in APIM 2.6.0 there was no ERROR) But when trying this out locally with APIM 3.2.0 or APIM 4.0.0 we can observe the same behavior.
When further analyzing I was able to identify that if we remove the wso2am-3.2.0/lib/xalan-2.7.2.wso2v2.jar and try invoking the same API it won't prompt any ERRORs. (Works as expected) This xalan-2.7.2 JAR is not in APIM 2.6.0 version.
We were able to resolve this issue by adding the below system parameter to startup script.
-Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl \
Affected Product Version:
APIM 3.2, APIM 4.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the APIM 3.2.0 and 4.0.0 behavior described in the report, including the startup script and the xalan-2.7.2.wso2v2.jar reference. Confirm whether the documentation should cover the TransformerFactory system parameter workaround; done means the affected versions and workaround are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100