product-ei
product-ei copied to clipboard
Exception is thrown while using XSLT mediator
Description:
Following exception is thrown while using XSLT mediator.
[2018-06-19 14:01:38,026] [EI-Core] ERROR - XSLTMediator Unable to perform XSLT transformation using : Value {name ='null', keyValue ='ESB-E2-LocalEntry-XsltEmptyPayloadsLeaveAudit.xslt'} against source XPath : s11:Body/child::*[position()=1] | s12:Body/child::*[position()=1] reason : Error creating XSLT transformer using : Value {name ='null', keyValue ='ESB-E2-LocalEntry-XsltEmptyPayloadsLeaveAudit.xslt'}
org.apache.synapse.SynapseException: Error creating XSLT transformer using : Value {name ='null', keyValue ='ESB-E2-LocalEntry-XsltEmptyPayloadsLeaveAudit.xslt'}
at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:367)
at org.apache.synapse.mediators.transform.XSLTMediator.createTemplate(XSLTMediator.java:404)
at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:243)
at org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:202)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:213)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Can not resolve namespace prefix: #all
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:933)
at org.apache.synapse.mediators.transform.XSLTMediator.createTemplate(XSLTMediator.java:394)
... 13 more
This is due to having xalan-2.7.2.wso2v2.jar, saxon9he.jar in endorsed folder. Since both have duplicated packages, if the saxon jar is picked up, the relevant functionality works fine, if xalan is picked up, the above exception is thrown.
Suggested Labels: Bug, EI 6.1.1 WUM updated
Suggested Assignees: N/A
Affected Product Version: EI 6.1.1
OS, DB, other environment details and versions: JDK 1.8
Steps to reproduce:
- Remove saxon9he.jar
- Created a proxy service with xslt tranformation
- Call the proxy service
Related Issues: https://github.com/wso2/product-ei/issues/39
Hi, I uninstalled the wso2 6.6.0 saxon jar and restarted, but I keep getting the above error.