On Fri, Feb 13, 2009 at 10:53 AM, pevgen <pev...@km.ru> wrote:
>
> I found a strange decision of the problem.
> There are string messages in my files, and i can append '<convertBodyTo
> type="java.lang.String"/>' after <from uri="file.....">. In this case the
> route work. and in-files move to backup directory.
Hi

1)
Thanks for sharing this. Without the convert Camel will use the File
handle as body and the JMS producer
will send the JMS as a byte message.

2)
When you do convert body to String you read the content and store it
as plain String on the Exchanage.
Then the JMS producer will just use the String and set a TextMessage.

So there could be a byte stream not being closed, in situation #1.



>
> Evgeny
>
>
>
> pevgen wrote:
>>
>> Hello.
>>
>> sometimes, but not each time, I got Exceptions :
>>
>> org.apache.camel.component.file.filecompon...@37165f] ERROR
>> org.apache.camel.component.file.FileConsumer  - Can not rename file from:
>> C:\Temp\amqtest\in\1.txt to: C:\Temp\amqtest\in\.camel\1.txt
>> java.io.IOException: Can not rename file from: C:\Temp\amqtest\in\1.txt
>> to: C:\Temp\amqtest\in\.camel\1.txt
>>       at
>> org.apache.camel.component.file.strategy.RenameFileProcessStrategy.commit(RenameFileProcessStrategy.java:69)
>> ....
>>
>>
>> and the file 'C:\Temp\amqtest\in\1.txt' didn't move from the directory,
>> and a file '1.txt.camelLock' didn't delete from the directory, too.
>>
>> i try to use the route :
>>
>> <route errorHandlerRef="deadLetterErrorHandlerInfinity">
>>             <from uri="file://C:\Temp\amqtest\in"/>
>>             <to ref="activemq:queue:myq1"/>
>> </route>
>>
>> and i use 'JmsTransactionManager'. I say about this, because when i don't
>> use the 'JmsTransactionManager',  it seems that i haven't got this error.
>>
>> any suggests ?
>>
>> Thanks.
>> Evgeny
>>
>
> --
> View this message in context: 
> http://www.nabble.com/File-component-%3A-file-don%27t-move-tp21980942s22882p21993317.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Reply via email to