On running it a couple of times I noticed it sometimes passes, sometimes
fails.

When changing the path to a shorter structure, like "a/b/" it passes all the
time, but a longer structure like "a/b/c/d/e/f/g/h/" often fails with the
last element being created as file instead of directory.


Arjan Moraal wrote:
> 
> Thanks James.
> I ran the test case from the trunk now. The first time it passed, then I
> deleted the "a" directory, ran the test again, then I got the following
> Exception:
> 
> 561 [seda:file1 thread:2] DEBUG
> org.apache.camel.component.file.FileProducer  - About to write to:
> a\b\c\d\e\f\g\h from exchange: Exchange[FileMessage: a\b\c\d\e\f\g\h]
> 561 [seda:file1 thread:2] ERROR
> org.apache.camel.processor.DeadLetterChannel  - On delivery attempt: 0
> caught: java.io.FileNotFoundException: a\b\c\d\e\f\g\h (The system cannot
> find the path specified)
> java.io.FileNotFoundException: a\b\c\d\e\f\g\h (The system cannot find the
> path specified)
>       at java.io.FileOutputStream.open(Native Method)
>       at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
>       at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>       at
> org.apache.camel.component.file.FileProducer.process(FileProducer.java:84)
>       at
> org.apache.camel.component.file.FileProducer.process(FileProducer.java:60)
>       at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44)
>       at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:73)
>       at
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:136)
>       at
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:86)
>       at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
>       at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
>       at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:53)
>       at 
> org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:61)
>       at java.lang.Thread.run(Thread.java:595)
> 
> Looking at the directory structure, it created "h" as file instead of
> directory.
> 
> Arjan
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-concurrent-dir-file-access--tf4724448s22882.html#a13511880
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to