You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mallesh Gorupati <mg...@iBASEt.com> on 2017/09/06 17:51:58 UTC
Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Hi
Getting below compilation error when I start ActiveMQ.
Error: Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[{{camel.xslt.file.directory}}?delay={{ca... because of Error checking type of the expression 'funcall(current-dateTime,[])'.
I got the same error when I ran java standalone camel program but it is solved once I copied camel-saxon.jar under java class path.
But for spring configuration, it is not working if I copy camel-saxon.jar in the ActiveMq class path libs like ../optional or../ camel or ../extra etc,.
I have tried below options as suggested in the forums but still couldn't solve the issue.
1. <to uri="xslt:file:xsl/my.xsl?transformerFactory=tFactory" /> <bean > id="tFactory" class="net.sf.saxon.TransformerFactoryImpl" />
2. Environment variable setup in the camel-configuration file
<prop key="javax.xml.transform.TransformerFactory">net.sf.saxon.xpath.XPathFactoryImpl</prop>
Appreciate your help..
Just adding the code snippets here..
Camel.xml
-----------------
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:My.Queue"/>
<to uri=" xslt:{{camel.xslt.file.directory}}/test.xslt"/>
<to uri="activemq:Another.Queue"/>
</route>
</camelContext>
test.xslt
-------------
<xsl:value-of select="current-dateTime()"/>
Thanks
Mallesh
RE: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Posted by "Vanshul.Chawla" <Va...@target.com>.
Cool. This issue is not related to ActiveMQ. When you start your Camel route, this error happened when Saxon dependency is not added as xslt 2.0 uses saxon for function calls.
-----Original Message-----
From: Mallesh Gorupati [mailto:mgorupati@iBASEt.com]
Sent: Wednesday, September 06, 2017 4:28 PM
To: users@camel.apache.org
Subject: RE: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Hi Vashul,
Thanks very much.
Actually ActiveMQ is not required any pom or Gradle files but I have included Saxon-HE-9.5.1-5.jar under camel lib folder and it is working now without any errors.
Thanks
Mallesh
-----Original Message-----
From: Vanshul.Chawla [mailto:Vanshul.Chawla@target.com]
Sent: Wednesday, September 6, 2017 1:47 PM
To: users@camel.apache.org
Subject: RE: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Add Saxon 9.5 dependency in your pom.xml(or gradle whichever u use) <dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-saxon</artifactId>
<version>2.15.0</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.5.1-5</version>
</dependency>
Change Camel version as per your case.
Also when you call xslt, call like this
<to uri="xslt:xxxx.xsl?saxon=true"/>
It will work fine then.
Vanshul
-----Original Message-----
From: Mallesh Gorupati [mailto:mgorupati@iBASEt.com]
Sent: Wednesday, September 06, 2017 12:52 PM
To: 'users@camel.apache.org' <us...@camel.apache.org>
Subject: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Hi
Getting below compilation error when I start ActiveMQ.
Error: Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[{{camel.xslt.file.directory}}?delay={{ca... because of Error checking type of the expression 'funcall(current-dateTime,[])'.
I got the same error when I ran java standalone camel program but it is solved once I copied camel-saxon.jar under java class path.
But for spring configuration, it is not working if I copy camel-saxon.jar in the ActiveMq class path libs like ../optional or../ camel or ../extra etc,.
I have tried below options as suggested in the forums but still couldn't solve the issue.
1. <to uri="xslt:file:xsl/my.xsl?transformerFactory=tFactory" /> <bean > id="tFactory" class="net.sf.saxon.TransformerFactoryImpl" />
2. Environment variable setup in the camel-configuration file
<prop key="javax.xml.transform.TransformerFactory">net.sf.saxon.xpath.XPathFactoryImpl</prop>
Appreciate your help..
Just adding the code snippets here..
Camel.xml
-----------------
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:My.Queue"/>
<to uri=" xslt:{{camel.xslt.file.directory}}/test.xslt"/>
<to uri="activemq:Another.Queue"/>
</route>
</camelContext>
test.xslt
-------------
<xsl:value-of select="current-dateTime()"/>
Thanks
Mallesh
RE: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Posted by Mallesh Gorupati <mg...@iBASEt.com>.
Hi Vashul,
Thanks very much.
Actually ActiveMQ is not required any pom or Gradle files but I have included Saxon-HE-9.5.1-5.jar under camel lib folder and it is working now without any errors.
Thanks
Mallesh
-----Original Message-----
From: Vanshul.Chawla [mailto:Vanshul.Chawla@target.com]
Sent: Wednesday, September 6, 2017 1:47 PM
To: users@camel.apache.org
Subject: RE: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Add Saxon 9.5 dependency in your pom.xml(or gradle whichever u use) <dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-saxon</artifactId>
<version>2.15.0</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.5.1-5</version>
</dependency>
Change Camel version as per your case.
Also when you call xslt, call like this
<to uri="xslt:xxxx.xsl?saxon=true"/>
It will work fine then.
Vanshul
-----Original Message-----
From: Mallesh Gorupati [mailto:mgorupati@iBASEt.com]
Sent: Wednesday, September 06, 2017 12:52 PM
To: 'users@camel.apache.org' <us...@camel.apache.org>
Subject: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Hi
Getting below compilation error when I start ActiveMQ.
Error: Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[{{camel.xslt.file.directory}}?delay={{ca... because of Error checking type of the expression 'funcall(current-dateTime,[])'.
I got the same error when I ran java standalone camel program but it is solved once I copied camel-saxon.jar under java class path.
But for spring configuration, it is not working if I copy camel-saxon.jar in the ActiveMq class path libs like ../optional or../ camel or ../extra etc,.
I have tried below options as suggested in the forums but still couldn't solve the issue.
1. <to uri="xslt:file:xsl/my.xsl?transformerFactory=tFactory" /> <bean > id="tFactory" class="net.sf.saxon.TransformerFactoryImpl" />
2. Environment variable setup in the camel-configuration file
<prop key="javax.xml.transform.TransformerFactory">net.sf.saxon.xpath.XPathFactoryImpl</prop>
Appreciate your help..
Just adding the code snippets here..
Camel.xml
-----------------
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:My.Queue"/>
<to uri=" xslt:{{camel.xslt.file.directory}}/test.xslt"/>
<to uri="activemq:Another.Queue"/>
</route>
</camelContext>
test.xslt
-------------
<xsl:value-of select="current-dateTime()"/>
Thanks
Mallesh
RE: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Posted by "Vanshul.Chawla" <Va...@target.com>.
Add Saxon 9.5 dependency in your pom.xml(or gradle whichever u use)
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-saxon</artifactId>
<version>2.15.0</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.5.1-5</version>
</dependency>
Change Camel version as per your case.
Also when you call xslt, call like this
<to uri="xslt:xxxx.xsl?saxon=true"/>
It will work fine then.
Vanshul
-----Original Message-----
From: Mallesh Gorupati [mailto:mgorupati@iBASEt.com]
Sent: Wednesday, September 06, 2017 12:52 PM
To: 'users@camel.apache.org' <us...@camel.apache.org>
Subject: [EXTERNAL] Active MQ 5.15.5 - XSLT2.0 - Compilation Issue
Hi
Getting below compilation error when I start ActiveMQ.
Error: Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[{{camel.xslt.file.directory}}?delay={{ca... because of Error checking type of the expression 'funcall(current-dateTime,[])'.
I got the same error when I ran java standalone camel program but it is solved once I copied camel-saxon.jar under java class path.
But for spring configuration, it is not working if I copy camel-saxon.jar in the ActiveMq class path libs like ../optional or../ camel or ../extra etc,.
I have tried below options as suggested in the forums but still couldn't solve the issue.
1. <to uri="xslt:file:xsl/my.xsl?transformerFactory=tFactory" /> <bean > id="tFactory" class="net.sf.saxon.TransformerFactoryImpl" />
2. Environment variable setup in the camel-configuration file
<prop key="javax.xml.transform.TransformerFactory">net.sf.saxon.xpath.XPathFactoryImpl</prop>
Appreciate your help..
Just adding the code snippets here..
Camel.xml
-----------------
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:My.Queue"/>
<to uri=" xslt:{{camel.xslt.file.directory}}/test.xslt"/>
<to uri="activemq:Another.Queue"/>
</route>
</camelContext>
test.xslt
-------------
<xsl:value-of select="current-dateTime()"/>
Thanks
Mallesh