I simplified it down to a very simple case, and then it does move the file to the .error directory, so it appears that my route is getting in the way.
I will simplify my architecture and see if I can get it working, thanks for the help! -----Original Message----- From: Hart, James W. Sent: Thursday, May 02, 2019 9:46 AM To: [email protected] Subject: RE: file moveFailed not working for me. [[ SEI WARNING *** This email was sent from an external source. Do not open attachments or click on links from unknown or suspicious senders. *** ]] Thanks Claus, I was thinking that it should work out of the box! I'm using version 2.22.3, I'll upgrade to the latest 2.23.2 and re-verify. I'll also make sure I'm not doing any custom error handling or turning on any error handling in beanio, and then I'll publish as simple an example as I can that shows the issue. Thanks. -----Original Message----- From: Claus Ibsen [mailto:[email protected]] Sent: Thursday, May 02, 2019 1:33 AM To: [email protected] Subject: Re: file moveFailed not working for me. [[ SEI WARNING *** This email was sent from an external source. Do not open attachments or click on links from unknown or suspicious senders. *** ]] Hi What Camel version do you use? And this should really work if there is an exception the file should be moved via moveFailed. But it may be that you are handling that exception or something so the file consumer regards the file as processed successfully. Take a deeper look what happens in your Camel route, and also you would need to share more details to us before we can help more. On Wed, May 1, 2019 at 3:42 PM Hart, James W. <[email protected]> wrote: > > I have a camel route that polls for files, and processes the files, and have > set "move" and "moveFailed" so that on success or failure the files should > move to their respective directories. But no matter what all of my files go > to the move directory, even though in my route I process a bad file and an > exception is thrown during the route. > > Either way when a good file or a bad file is processed, both are moved to the > move directory. > > Here is the string for my from on my route: > > file:///dataupload/boximetadata/csv?charset=iso-8859-1&include=.*.csv&initialDelay=0&maxMessagesPerPoll=1&move=..%5C..%5Cboximetadataarchive%5Ccsv&moveFailed=.error > > The exception is this from beanio: > org.beanio.InvalidRecordException: Invalid 'rowdata' record at line 2 > > Am I misunderstanding this, or do I need to do different exception handling? > Does anybody have any ideas on why all files end up in the move directory? > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
