Hi Thanks for sharing this. Kinda strange .xls is locked while .csv is not. If the file is .csv it's not as if Excel will temporary rename it while it has it open?
Could you try other applications to lock the file, for instance WordPad or whatever text editor. etc. I am leaving for early x-mas to areas where internet might not be accessible. So I might not be back before 2nd Jan 2009. On Thu, Dec 18, 2008 at 8:52 PM, watcher <patr...@daly.ws> wrote: > > 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. > > -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/