camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bilgin Ibryam <bibr...@gmail.com>
Subject Re: Error in XSLT message tranformation
Date Tue, 03 Dec 2013 22:51:59 GMT
You are not xslt component at all, you are using file component in all your
uris. Change the second endpoint to

to("xslt:...

Cheers,



On Tue, Dec 3, 2013 at 8:21 PM, madusanka <madusankabalasooriya@gmail.com>wrote:

> Hi,
>
> My requirement is to transform an XML array using XSLT. But it gives the
> "GenericFileOperationFailedException: Cannot store file:
> /home/madusanka/Desktop/example.xsl/hello.xml~". What could be the reason?
>
> ++++++++++++++++++++++++++++++++++ array +++++++++++++++++++++++++++++++
>
>                 <array>
>                         <value>755</value>
>                         <value>5861</value>
>                         <value>4328</value>
>                 </array>
>
> +++++++++++++++++++++++++++++++ camelContext ++++++++++++++++++++++++++++
>
>
>     <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>         <camel:route>
>             <camel:from
> uri="file:///home/madusanka/Desktop/inbox?noop=true"
> />
>             <camel:to uri="file:///home/madusanka/Desktop/example.xsl"/>
>             <camel:to
> uri="file:///home/madusanka/Desktop/outbox?noop=true"/>
>         </camel:route>
>     </camel:camelContext>
>
>
> ++++++++++++++++++++++++++++++++++ XSLT +++++++++++++++++++++++++++++++
>
>     <xsl:template match="/array">
>         <array>
>             <xsl:for-each select="value">
>                 <int>
>                     <xsl:value-of select="." />
>                 </int>
>             </xsl:for-each>
>         </array>
>     </xsl:template>
>
>
> ++++++++++++++++++++++++++++++++++ Error +++++++++++++++++++++++++++++++
>
> 2013-12-04 01:44:42,094 | WARN  | ka/Desktop/inbox |
> GenericFileOnCompletion
> | 100 - org.apache.camel.camel-core - 2.10.6 | Rollback file strategy:
>
> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@11c4d14
> for file: GenericFile[/home/madusanka/Desktop/inbox/hello.xml]
> 2013-12-04 01:44:42,596 | ERROR | ka/Desktop/inbox | DefaultErrorHandler
> | 100 - org.apache.camel.camel-core - 2.10.6 | Failed delivery for
> (MessageId: ID-madusanka-G31M-55101-1386101656967-0-185 on ExchangeId:
> ID-madusanka-G31M-55101-1386101656967-0-186). Exhausted after delivery
> attempt: 1 caught:
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file: /home/madusanka/Desktop/example.xsl/hello.xml~
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file: /home/madusanka/Desktop/example.xsl/hello.xml~
>         at
>
> org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:264)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:249)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:151)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:76)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:335)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:308)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:336)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:143)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:93)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_26]
>         at
>
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_26]
>         at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_26]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_26]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_26]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_26]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
> Caused by: java.io.FileNotFoundException:
> /home/madusanka/Desktop/example.xsl/hello.xml~ (Not a directory)
>         at java.io.FileOutputStream.open(Native Method)[:1.6.0_26]
>         at
> java.io.FileOutputStream.<init>(FileOutputStream.java:194)[:1.6.0_26]
>         at
> java.io.FileOutputStream.<init>(FileOutputStream.java:145)[:1.6.0_26]
>         at
>
> org.apache.camel.component.file.FileOperations.prepareOutputFileChannel(FileOperations.java:425)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.FileOperations.writeFileByFile(FileOperations.java:348)[100:org.apache.camel.camel-core:2.10.6]
>         at
>
> org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:237)[100:org.apache.camel.camel-core:2.10.6]
>         ... 49 more
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Error-in-XSLT-message-tranformation-tp5744263.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Bilgin Ibryam

Apache Camel & Apache OFBiz committer
Blog: ofbizian.com
Twitter: @bibryam <https://twitter.com/bibryam>

Author of Instant Apache Camel Message Routing
http://www.amazon.com/dp/1783283475

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message