camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9634) Xtokenize with streaming() does not close stream
Date Wed, 24 Feb 2016 09:08:18 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-9634:
-------------------------------
    Fix Version/s: 2.15.6

> Xtokenize with streaming() does not close stream
> ------------------------------------------------
>
>                 Key: CAMEL-9634
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9634
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.16.2
>            Reporter: Timo Bredehoeft
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.15.6, 2.16.3, 2.17.0
>
>
> If I split a XML-file with xtokenize and streaming() in combination with a move-option
on the file-consumer, I get an exception that the file cannot be moved. I assume that the
stream is not closed or the file is otherwise still locked.
> Simple example route:
> from("file:data/xmltest?move=inProcessing/${file:name}") 
>                         .split().xtokenize("//order", new Namespaces("", "")).streaming()
 
>                         .convertBodyTo(String.class)
>                         .to("file:data/output?fileName=dummy.txt")
>                     .end();
> Error stacktrace:
> 2016-02-23 11:14:46 WARN  GenericFileOnCompletion:136 - Error during commit. Exchange[ID-ZZZZZZZ-52905-1456222481032-0-2][order1.xml].
Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Error renaming
file from D:\data\xmltest\order1.xml to data\xmltest\inProcessing\order1.xml]
> org.apache.camel.component.file.GenericFileOperationFailedException: Error renaming file
from D:\data\xmltest\order1.xml to data\xmltest\inProcessing\order1.xml
> 	at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:81)
> 	at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:113)
> 	at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:88)
> 	at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:127)
> 	at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:83)
> 	at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:57)
> 	at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:104)
> 	at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:229)
> 	at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:65)
> 	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:653)
> 	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:608)
> 	at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:239)
> 	at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:250)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:491)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
> 	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:442)
> 	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:214)
> 	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:178)
> 	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
> 	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> 	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown
Source)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> Caused by: java.io.IOException: Renaming file from 'D:\data\xmltest\order1.xml' to 'data\xmltest\inProcessing\order1.xml'
failed: Cannot delete file 'D:\data\xmltest\order1.xml' after copy succeeded
> 	at org.apache.camel.util.FileUtil.renameFileUsingCopy(FileUtil.java:510)
> 	at org.apache.camel.util.FileUtil.renameFile(FileUtil.java:482)
> 	at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:78)
> 	... 27 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message