You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bruno Dusausoy <bd...@yp5.be> on 2010/10/15 14:56:49 UTC
GenericFileOperationFailedException
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<te...@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.
Re: GenericFileOperationFailedException
Posted by Bruno Dusausoy <bd...@yp5.be>.
On Fri, 15 Oct 2010 14:56:49 +0200, Bruno Dusausoy <bd...@yp5.be>
wrote:
[...]
I've just looked more carefully at the documentation and used the
"?move=" attribute.
It works.
Sorry for the noise.
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.