camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ganga_camel <ganga...@gmail.com>
Subject xalan 2.7.2 working in IntelliJ IDE and not as .jar
Date Thu, 09 Jun 2016 11:10:13 GMT
Hi,

I am trying to transform xml using XSLT in Camel. The dependency I have is 
compile group: 'xalan', name: 'xalan', version: '2.7.2'

I am trying to perform this step in xslt 

 <xsl:param name="productStatusCode"/>
    <xsl:variable name="longAnnot">
        <xsl:sequence select=
                              "//cc:Annotation[not(string-length(.) &lt;
//cc:Annotation/string-length(.))]"/>
    </xsl:variable>

Am using this variable later in my xslt for further transformation

When I run my camel routes through IntelliJ IDE all runs fine, however when
I build a .jar file our of it and run it from command-line I get the below
error

/*"javax.xml.transform.TransformerException: "select" attribute is not
allowed on the xsl:sequence element!"*/

Below is the stack trace of the error, is there something that I am missing
as part of dependency.

Any help is highly appreciated!!!!

2016-06-09 16:32:28.978  INFO 11904 --- [main]
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.16.2
(CamelContext: camel-1) is shutting down
2016-06-09 16:32:28.985  INFO 11904 --- [main]
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.16.2
(CamelContext: camel-1) uptime 1.150 seconds
2016-06-09 16:32:28.986  INFO 11904 --- [main]
o.a.camel.spring.SpringCamelContext      : Apache Camel 2.16.2
(CamelContext: camel-1) is shutdown in 0.006 seconds
2016-06-09 16:32:28.993  INFO 11904 --- [main]
o.e.jetty.server.handler.ContextHandler  : Stopped
o.s.b.c.e.j.JettyEmbeddedWebAppContext@7cf8f87b{/,jar:file:/C:/Users/z062335/IdeaProjects/IDL-Loader/build/libs/IDL-Loader-1.0-SNAPSHOT.war!/,UNAVAILABLE}
2016-06-09 16:32:29.001 ERROR 11904 --- [main] o.s.boot.SpringApplication              
: Application startup failed

org.apache.camel.spring.boot.CamelSpringBootInitializationException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
activeProductsRoute at: >>> Choice[[When[xpath{//ContentCafe/Message/text()
= 'Valid Item'} -> [Log[Valid Item; sending to IDL Queue],
SetBody[simple{Simple: ${property.apiData}}], To[xslt:{{bntToIdlFormat}}],
To[file:src/data?fileName=IDLXml.xml&fileExist=Append],
To[seda:writetoIdlQ]]]] Otherwise[[Log[Rejected Item, sending to reject Q],
To[seda:rejectRecords]]]] <<< in route:
Route(activeProductsRoute)[[From[seda:processActiveProducts]... because of
Failed to resolve endpoint: xslt://xslt/MMBIDLFormat.xsl due to:
javax.xml.transform.TransformerException: org.xml.sax.SAXException: "select"
attribute is not allowed on the xsl:sequence element!
javax.xml.transform.TransformerException: "select" attribute is not allowed
on the xsl:sequence element!
	at
org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:94)
	at
org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:38)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)
	at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
	at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
	at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
	at
org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
	at com.tci.item.idlLoader.Application.main(Application.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at
org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route activeProductsRoute at: >>>
Choice[[When[xpath{//ContentCafe/Message/text() = 'Valid Item'} ->
[Log[Valid Item; sending to IDL Queue], SetBody[simple{Simple:
${property.apiData}}], To[xslt:{{bntToIdlFormat}}],
To[file:src/data?fileName=IDLXml.xml&fileExist=Append],
To[seda:writetoIdlQ]]]] Otherwise[[Log[Rejected Item, sending to reject Q],
To[seda:rejectRecords]]]] <<< in route:
Route(activeProductsRoute)[[From[seda:processActiveProducts]... because of
Failed to resolve endpoint: xslt://xslt/MMBIDLFormat.xsl due to:
javax.xml.transform.TransformerException: org.xml.sax.SAXException: "select"
attribute is not allowed on the xsl:sequence element!
javax.xml.transform.TransformerException: "select" attribute is not allowed
on the xsl:sequence element!
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1072)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
	at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:947)
	at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3258)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2981)
	at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
	at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2812)
	at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2808)
	at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2831)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2808)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2777)
	at
org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:92)
	... 19 common frames omitted



--
View this message in context: http://camel.465427.n5.nabble.com/xalan-2-7-2-working-in-IntelliJ-IDE-and-not-as-jar-tp5783762.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message