Hi Jon,

thanx, but this didn't help
but found that I had the readLock set to file lock in my uri.

 
uri="file://target/conf-dir?filter=#myAntFilter&move=.done&delay=2000&readLock=fileLock"


I thought this wouldn't matter.

Btw. it also did prevent me from converting it into a string like you
suggested.

Regards, Achim

2011/8/5 Jon Anstey <[email protected]>:
> Hi Achim,
>
> This could be a Windows only problem occurring... but you could try putting
> a <convertBodyTo type="java.lang.String"/> before the unmarshal to see if
> loading the file content into memory will workaround this.
>
> Cheers,
> Jon
>
> On Fri, Aug 5, 2011 at 12:11 PM, Achim Nierbeck 
> <[email protected]>wrote:
>
>> Hi
>>
>> I do have a very strange behavior with
>> camel 2.8 and the camel-bindy module on my windows machine.
>>
>> My camel route is quite straight forward
>>
>>                <camel:route id="readBrandConfig">
>>                        <camel:from ref="fileEndpoint" />
>>                                <camel:unmarshal ref="bindyDataformat" />
>>                                <camel:convertBodyTo
>>                                        type="myentity.entity.Dummy" />
>>                                <camel:to id="storeEntity"
>>                                        uri="jpa://myentity.entity.Dummy" />
>>                                <camel:to uri="mock:test" />
>>                </camel:route>
>>
>> Now while debugging I'm in the class BindyCsvDataFormat
>> running through the unmarshall method.
>>
>> after the Scanner class is created with the given InputStreamReader
>> the scanner obect looks good.
>> There is no entry for the lastException field inside of the scanner object.
>>
>> After the while loop with
>> scanner.hasNextLine()
>>
>> the scanner object contains a lastException
>> which is IOException
>> telling me that the file is locked by another process.
>>
>> Now I used the SysInternals handle exec to give me a clue which process
>> does take a hold on this file that is supposed to be unmarshalled.
>> It shows me that my java executable does take a hold on my csv file twice.
>> I guess this is the problem but how can I get around it?
>>
>> Thanx, Achim
>>
>>
>> --
>>
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>>
>
>
>
> --
> Cheers,
> Jon
> ---------------
> FuseSource
> Email: [email protected]
> Web: fusesource.com
> Twitter: jon_anstey
> Blog: http://janstey.blogspot.com
> Author of Camel in Action: http://manning.com/ibsen
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
blog <http://notizblog.nierbeck.de/>

Reply via email to