camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yih Tsern (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9481) Unable to move completed file when there are out Messages
Date Tue, 05 Jan 2016 11:17:39 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082861#comment-15082861
] 

Yih Tsern commented on CAMEL-9481:
----------------------------------

Here's my finding:
{code:java}
from("file:target/test")
        .process(ex -> ex.getOut()) // #1 Creates new, empty 'out' Message
        // #2 previous empty 'out' Message gets copied as 'in' Message for next processor
        .process(ex -> ex.getOut()); // #3 Creates new 'out' Message

// #4 GenericFileRenameProcessStrategy.commit ->
//      GenericFile.bindToExchange sets headers to 'out' Message (created by #3)
//      BUT ExpressionBuilder's expressions get headers from 'in' Message (which is empty,
from #2)
{code}

> Unable to move completed file when there are out Messages
> ---------------------------------------------------------
>
>                 Key: CAMEL-9481
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9481
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: Should be since Camel version 2.9.0, personally only tested 2.9.0
& 2.15.0.
>            Reporter: Yih Tsern
>            Priority: Minor
>
> When route is something like this:
> {code:java}
> from("file:target/test")
>         .process(ex -> ex.getOut())
>         .process(ex -> ex.getOut());
> {code}
> file consumption completes with:
> {noformat}
> 16528 [Camel (camel-1) thread #1 - file://target/test] ERROR org.apache.camel.component.file.GenericFileOnCompletion
- Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Error
renaming file from C:\workspace\projects\test-camel\target\test\New Text Document.txt to \.camel\]
> org.apache.camel.component.file.GenericFileOperationFailedException: Error renaming file
from C:\workspace\projects\test-camel\target\test\New Text Document.txt to \.camel\
> 	at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:68)
> 	at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:96)
> 	at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)
> 	at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:132)
> 	...<snip>
> Caused by: java.io.FileNotFoundException: \.camel (Access is denied)
> 	at java.io.FileOutputStream.open0(Native Method)
> 	at java.io.FileOutputStream.open(FileOutputStream.java:270)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
> 	at org.apache.camel.util.FileUtil.copyFile(FileUtil.java:364)
> 	at org.apache.camel.util.FileUtil.renameFile(FileUtil.java:348)
> 	at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:66)
> 	...<snip>
> {noformat}



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

Mime
View raw message