camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sigmund.lundgren" <sigmund.lundg...@gmail.com>
Subject Re: camel xslt 2.0 support
Date Tue, 17 Apr 2012 11:48:51 GMT
That's correct use saxon HE 9 for XSLT 2.0




Skickat från Samsung TabletClaus Ibsen <claus.ibsen@gmail.com> skrev:Hi

You need to install camel-saxon feature as it has saxon xml library
which offers xslt 2.0 I think.
http://saxon.sourceforge.net/

You most likely also need to restart the ESB.

The old xalan that is shipped with the JVM is only support XSLT 1.x I think.
http://xml.apache.org/xalan-j/


On Tue, Apr 17, 2012 at 12:24 PM, pchakinala
<praveen.chakinala@planetsoft.com> wrote:
> Hi,
> we are using camel-xslt component for xml transformation and xslt version is
> 2.0. Below route definition is working fine with  servicemix 4.3.
>
> <route>
>      <from uri="jetty:http://0.0.0.0:8192/httpRepreq/"/>
>         <to uri="xslt:car-response1.xsl"/>
>       <to
> uri="http://localhost:8080/jsp-examples/checkbox/mefACK.jsp?bridgeEndpoint=true"/>
>       </route>
> However we require xslt 2.0 support for that i have changed uri like below
> in the route definition.
> After modifing the definition found below error at the time of bundle
> deployment
> <to uri="xslt:car-response1.xsl?transformerFactory=tFactory"/>
>
> Error:
> admin@root>Exception in thread "SpringOsgiExtenderThread-18"
> org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Fa
> iled to create route route5 at: >>>
> To[xslt:car-response1.xsl?transformerFactory=tFactory] <<< in route:
> Route[[From[jetty:http://0.0.0.0:8192/httpRep
> req/]] -> [conv... because of Failed to resolve endpoint:
> xslt://car-response1.xsl?transformerFactory=tFactory due to: Could not
> compile stylesheet cl
> ass path resource [car-response1.xsl]
>        at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1164)
>        at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:117)
>        at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240)
>        at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
>        at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
>        at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
>        at
> org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.ja
> va:358)
>        at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplication
> Context.java:320)
>        at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dependen
> cyWaiterApplicationContextExecutor.java:132)
>        at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route route5 at: >>> To[xslt:car-response1.xsl?transformerFactory=tFactory]
>  <<< in route: Route[[From[jetty:http://0.0.0.0:8192/httpRepreq/]] ->
> [conv... because of Failed to resolve endpoint:
> xslt://car-response1.xsl?transfo
> rmerFactory=tFactory due to: Could not compile stylesheet class path
> resource [car-response1.xsl]
>        at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:820)
>        at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:165)
>        at
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:697)
>        at
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1665)
>        at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1452)
>        at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1349)
>        at
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:176)
>        at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
>        at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
>        at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1317)
>        at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:221)
>        at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115)
>        ... 10 more
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint: xslt://car-response1.xsl?transformerFactory=tFactory due
> to: C
> ould not compile stylesheet class path resource [car-response1.xsl]
>        at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:443)
>        at
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:48)
>        at
> org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:180)
>        at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:110)
>        at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
>        at
> org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
>        at
> org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
>        at
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:437)
>        at
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:183)
>        at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:817)
>        ... 21 more
> Caused by: javax.xml.transform.TransformerConfigurationException: Could not
> compile stylesheet class path resource [car-response1.xsl]
>        at
> org.apache.camel.component.xslt.XsltComponent.loadResource(XsltComponent.java:175)
>        at
> org.apache.camel.component.xslt.XsltComponent.createEndpoint(XsltComponent.java:133)
>        at
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:75)
>        at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:425)
>        ... 30 more
> Caused by: javax.xml.transform.TransformerConfigurationException: Could not
> compile stylesheet
>        at
> org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:832)
>        at
> org.apache.camel.builder.xml.XsltBuilder.setTransformerSource(XsltBuilder.java:301)
>        at
> org.apache.camel.builder.xml.XsltBuilder.setTransformerInputStream(XsltBuilder.java:331)
>        at
> org.apache.camel.component.xslt.XsltComponent.loadResource(XsltComponent.java:170)
>        ... 33 more
>
>
> Can you suggest how to configure transformerFactory property? Is this
> approach works with XSLT 2.0 Style sheets
>
> thanks
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-xslt-2-0-support-tp5646214p5646214.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message