camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: LocalWorkDirectory is not working when used with multicast
Date Thu, 12 Dec 2013 10:47:02 GMT
Hi

This is expected. As the file component when using local work dir does
a fast-copy by renaming the file. And that can only work once.

So dont do the multicast.

And why do you do that. Is it just for fun, or is there any real life
use-case for that?



On Thu, Dec 12, 2013 at 11:29 AM, Bharath <bharath4yew@gmail.com> wrote:
> Hi,
>
>     My route is
>
> <from
> uri="sftp://hostname:22/input?username=xxxx&amp;password=yyyyy&amp;binary=true&amp;localWorkDirectory=/tmp"
> />
> <multicast>
>         <to uri="file:/mnt/input" />
>         <to uri="file:/mnt/output" />
> </multicast>
>
> 1) I placed abc.xml in sftp location the file is being transferred only to
> /mnt/input
> 2) /mnt/output is empty
> 3) I am getting the following exception
>
> (MessageId: ID-bharath-desktop-32973-1386840329681-8-629 on ExchangeId:
> ID-bharath-desktop-32973-1386840329681-8-632). Exhausted after delivery
> attempt: 1 caught:
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file: /mnt/input/abc.xml
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file: /mnt/input/abc.xml
>         at
> org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:264)[148:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:249)[148:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:151)[148:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>
> Caused by: java.io.FileNotFoundException: /tmp/abc.xml (No such file or
> directory)
>         at java.io.FileInputStream.open(Native Method)[:1.7.0_21]
>         at java.io.FileInputStream.<init>(FileInputStream.java:138)[:1.7.0_21]
>         at
> org.apache.camel.util.FileUtil.copyFile(FileUtil.java:398)[148:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
> org.apache.camel.util.FileUtil.renameFile(FileUtil.java:382)[148:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
> org.apache.camel.component.file.FileOperations.writeFileByLocalWorkPath(FileOperations.java:341)[148:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>
> What should I do to get this working?
>
> Camel Version is 2.10.0
>
> Cheers!!!
> Bharath.R
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/LocalWorkDirectory-is-not-working-when-used-with-multicast-tp5744664.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Mime
View raw message