Hi guys,
I have a problem using transformer.
I have to apply a xslt transformation. I got it with stylesheet version 1.0 in the following way:
<int-xml:xslt-transformer input-channel="input-channel"
output-channel="output-channel" xsl-resource="classpath:/my.xsl" />
but if I have a stylesheet 2.0 I receive an error because spring integration behind the scene uses xalan that doesn't support xpath2.
To avoid that I tried to use a different transformer, saxon that is xslt 2.0 compliant, but I received the following error.
<int-xml:xslt-transformer input-channel="input-channel"
output-channel="output-channel" xsl-resource="classpath:/my2-0.xsl" result-transformer="net.sf.saxon.TransformerFactoryImpl" />
Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.xml.transformer.X sltPayloadTransformer#0': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:250)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:1035)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:939)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 94)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:225)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:291 )
Any help will be appreciate.
Thank you.
Mariateresa


Reply With Quote