You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Yih Tsern (JIRA)" <ji...@apache.org> on 2016/01/05 12:22:39 UTC

[jira] [Comment Edited] (CAMEL-9481) Unable to move completed file when there are out Messages

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

Yih Tsern edited comment on CAMEL-9481 at 1/5/16 11:22 AM:
-----------------------------------------------------------

I don't think this is a _realistic_ issue, because:
# Seems like nobody face this issue before
# http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html already documented that if you want to play with Exchange.getOut(), you should also copy the headers and stuff from Exchange.getIn().

The purpose of this ticket is mainly to document the issue, in case someone *somehow* encounters it.


was (Author: yihtserns):
I don't think this is a _realistic_ issue, because:
1. Seems like nobody face this issue before
2. http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html already documented that if you want to play with Exchange.getOut(), you should also copy the headers and stuff from Exchange.getIn().

This is mainly to document the issue, in case someone *somehow* encounters it.

> 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)