You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by 33dennis <de...@digitalfoundry.com> on 2012/12/20 01:10:51 UTC

Endless GenericFileOperationFailedException: Cannot Change Directory to:

I have a route with a timer though when done debugging, it ends up being a
route with a quartz to activate every hour.   I want to failsafe the
condition where the ftp directory "dev" does not exist, to complain, but
then wait until the next polling interval to try again.  Instead it keeps
trying forever without regard to the timer or quartz.  I am using camel
2.9.2, via the grails plugin.  Here is my route:



Here is the dump of what happens in the log, there are many of these
occurring one after another, instead of one every hour, or one every minute.
What can I do to better handle this case, just in case someone removes the
ftp directory we are looking for, without going into an endless retry?  I
have tried controlling it with the maximumReconnectAttempts, and
thowExceptionOnConnectFailed, but predictably those are not affecting this
particular scenario since we can login fine.





--
View this message in context: http://camel.465427.n5.nabble.com/Endless-GenericFileOperationFailedException-Cannot-Change-Directory-to-tp5724406.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Endless GenericFileOperationFailedException: Cannot Change Directory to:

Posted by 33dennis <de...@digitalfoundry.com>.
Thanks, I am new to camel, so may not be understanding everything.  The goal
is to schedule at a certain time of day, a pull of two files, in sequence
from the sftp site.  I arrived at this solution by reviewing the
documentation.  Is there a better way to do this to ensure that we only
check at certain times of the day (hence quartz) and then ensure that one
file is processed before the other?  



--
View this message in context: http://camel.465427.n5.nabble.com/Endless-GenericFileOperationFailedException-Cannot-Change-Directory-to-tp5724406p5724464.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Endless GenericFileOperationFailedException: Cannot Change Directory to:

Posted by Willem jiang <wi...@gmail.com>.
Hi,

I checked the route, I don't think it is good practice to use the pullEnrich on the file (or sftp) endpoint.
As you know the file consumer has it's own thread pool to pull the files, you don't need to use the timer or quartz to trigger the pulling.
You can setup the delay option on it to control the time of each pull.

Maybe you can consider to use quartz to start and stop the camel route which pulls the files from FTP.



--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, December 20, 2012 at 8:10 AM, 33dennis wrote:

> I have a route with a timer though when done debugging, it ends up being a
> route with a quartz to activate every hour. I want to failsafe the
> condition where the ftp directory "dev" does not exist, to complain, but
> then wait until the next polling interval to try again. Instead it keeps
> trying forever without regard to the timer or quartz. I am using camel
> 2.9.2, via the grails plugin. Here is my route:
>  
>  
>  
> Here is the dump of what happens in the log, there are many of these
> occurring one after another, instead of one every hour, or one every minute.
> What can I do to better handle this case, just in case someone removes the
> ftp directory we are looking for, without going into an endless retry? I
> have tried controlling it with the maximumReconnectAttempts, and
> thowExceptionOnConnectFailed, but predictably those are not affecting this
> particular scenario since we can login fine.
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Endless-GenericFileOperationFailedException-Cannot-Change-Directory-to-tp5724406.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).