Hi,

I'm using Camel 2.4.0 on Windows.
I have a simple route which takes a file from fs and add it as attachment to an email :

       from("file:c:\\post?fileName=input.csv")
       .process(new Processor() {
           public void process(Exchange exchange) throws Exception {

               Message in = exchange.getIn();
               Message out = exchange.getOut();

               out.addAttachment(
                   in.getHeader("CamelFileName", String.class),
new DataHandler(new FileDataSource(in.getBody(File.class)))
               );
               out.setBody("Mail message");
           }
       })
.to("smtp://localhost:25?username=test&password=test&from=Test<t...@localhost>&to=Test<t...@localhost>&subject=Test");

It works fine when setting "?noop=true" to the file endpoint but when removing it I get :

[Camel Thread 0 - file://c:post] GenericFileOnCompletion ERROR Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot rename file: GenericFile[c:\post\input.csv] to: GenericFile[\.camel\]]
[...]

I've found an issue related to this : https://issues.apache.org/activemq/browse/CAMEL-1965 It says it's fixed since more than a year so I guess it works fine, otherwise someone would have reopened it.
Am I missing something in my code ?

Regards.
--
Bruno Dusausoy
YP5 Software

--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Reply via email to