I am trying to pass the XSL file which is located in the classpath to Mule XSL-T transformer in my flow. Bit it is giving me error.
<mule-xml:xslt-transformer
maxIdleTransformers="2" maxActiveTransformers="5"
xsl-file="classpath:xslt/Person_Extractor.xsl">
</mule-xml:xslt-transformer>
Given below is the error shown in Eclipse console when I tried to run this application.
********************************************************************************
2013-01-18 15:00:00,596 ERROR [main] mule.MuleServer (MuleServer.java:474) -
********************************************************************************
* A Fatal error has occurred while the server was running: *
* Unable to load resource classpath:xslt/Person_Extractor.xsl *
* (java.io.IOException) *
* *
* The error is fatal, the system will shutdown *
********************************************************************************
I tried all the different combinations like
classpath:/xslt/Person_Extractor.xsl
classpath:\xslt\Person_Extractor.xsl
But no luck.
When I give the full physical path of the file it works fine.
<mule-xml:xslt-transformer
maxIdleTransformers="2" maxActiveTransformers="5"
xsl-file="c:\EWS\MyMuleProj\src\main\resources\xslt\Person_Extractor.xsl">
</mule-xml:xslt-transformer>
Please guide me.
The docs say xsl-file “can be a path on the local file system or on the classpath”, so have you tried without the
classpath:, i.e.xsl-file="xslt/Person_Extractor.xsl"?