3 Replies Latest reply on Sep 18, 2013 4:17 AM by Claus Ibsen

    Issue with XSLT in camel

    Kishor Pawar Newbie

      Hi,

       

      I have created a camel route as below. I am facing issue with the xslt transformation highlighted below.

       

      org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route jms-cbr-route at: >>> To[xslt://transforms/Employee.xsl] <<< in route: Route[[From[activemq:incomingOrders]] -> [Log[**** Consuming... because of Failed to resolve endpoint: xslt://transforms/Employee.xsl due to: java.io.FileNotFoundException: Cannot find resource in classpath for URI: transforms/Employee.xsl

       

      <camelContext xmlns="http://camel.apache.org/schema/spring">

              <route id="file-to-jms-route">

                  <from uri="file:work/jms/input" />

                  <log message="Receiving order ${file:name}" />

                  <to uri="activemq:incomingOrders" />

              </route>

              <route id="jms-cbr-route">

                  <from uri="activemq:incomingOrders" />

                  <log message="**** Consuming message from activemq ****" />

                  <log message="${body}" />

                  <!-- <to uri="xslt:file:///home/admin/Desktop/RPM/poc/camel-routing-su/src/main/resources/transforms/Employee.xsl"/> -->

                  <to uri="xslt://transforms/Employee.xsl" />

                  <log message="**** Transformation Completed ****" />

                  <log message="${body}" />

                  <unmarshal>

                      <jaxb prettyPrint="true" contextPath="com.specsavers.xml.ss.schema.poc" />

                  </unmarshal>

                  <log message="**** Unmarshalling Completed ****" />

                  <process ref="beanService" />

                  <log message="Done processing ${file:name}" />

              </route>

          </camelContext>