Hi Claus

Thanks for that.
I was able to reproduce the problem using the unit test below.
It seems that the test passes if you use a file with the extension .xls
saving the file as a csv will cause a FileNotFoundException


Claus Ibsen-2 wrote:
> 
> On Thu, Dec 18, 2008 at 10:49 AM, watcher <patr...@daly.ws> wrote:
>>
>>  I'm testing on WindowsXP with NTFS.
>> Is there anything else I should try.
>>
>> I wont be able to work on this until tonight.
> Here is the unit test that I run. I open the excel file before
> starting the unit test.
> 
> /**
>  * Unit test to verify exclusive read by for manual testing.
>  */
> public class FileExclusiveReadManuelTest extends ContextTestSupport {
> 
>     private String fileUrl = "file://target/exclusiveread";
> 
>     @Override
>     protected void setUp() throws Exception {
>         disableJMX();
>         super.setUp();
>     }
> 
>     public void testManually() throws Exception {
>         deleteDirectory("./target/exclusiveread");
>         MockEndpoint mock = getMockEndpoint("mock:result");
>         mock.setSleepForEmptyTest(10000);
>         mock.expectedMessageCount(0);
> 
>         mock.assertIsSatisfied();
>     }
> 
>     protected RouteBuilder createRouteBuilder() throws Exception {
>         return new RouteBuilder() {
>             public void configure() throws Exception {
>                 from(fileUrl).to("mock:result");
>             }
>         };
>     }
> 
> 
> Notice the setSleepForEmptyTest is currently not working in 1.5.0. So
> you should do Thread.sleep(10000) instead.
> 
> 
> 
>>
>> Thanks
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> I just tried on my local system: WindowsXP with NTFS
>>>
>>>
>>> It worked fine. I had an excel file opened and Camel waited for the
>>> lock. I closed the excel and Camel instantly got the read lock and
>>> continued to operate.
>>>
>>> Opening the file in Excel
>>> ...
>>> 07:15:48 = trying to get the lock
>>> ...
>>> Closing the file in Excel
>>> ...
>>> 07:15:55 = got the lock
>>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/FileComponent-FileNotFoundException-tp21054406s22882p21069665.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> 
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FileComponent-FileNotFoundException-tp21054406s22882p21079746.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to