camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Nambiar <>
Subject XSLT endpoint usage notes.
Date Wed, 17 Jun 2009 09:25:49 GMT


In case anybody faces issues with the XSLT endpoint please review these

I was trying to use an xslt endpoint for a simple transformation from one
xml to another using a simple xsl. The output xml kept appearing (after the
xslt processor in the route) with outermost xml tag with no content within.

No explanations show up in the DEBUG logs. On the TRACE logs however I did
find some error/warning indicating that the XMLConverter bean could no be

After a few hours of cranking my mind, I had to do the following to get it
to work (thanks to some posts on the users forum that gave some clue):

1. Use the transformerFactory option in the route
("xslt:my-transformer.xsl?transformerFactory=tFactory") with the tFactory
bean having bean defined in the spring context for
2. Added the Xalan jar into my maven pom.

My guess is that the default xml parsing mechanism supplied within the JDK
(I am using 1.6.0_03) does not work right in this context and does not throw
up any error either. When I switched to Xalan this way it works. This is not
a Camel issue, but might need a mention on the xslt component page.

Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One
workaround is to add the 2.1 jar to the jre/lib/endorsed directory for the
jvm or as specified by the container.

Hope this post saves newbie Camel riders some time.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message