Grokbase Groups Camel users May 2012
FAQ
HI..

I am using the following route to consume files from FTP server and store in
a local folder. When the directory name is not correct, it raises this
exception -
org.apache.camel.component.file.GenericFileOperationFailedException: File
operation failed: 550. I want to handle them.

from(ftpUrl).routeId("FTP_ROUTE").to(fileUrl).to("bean:localRouteHelper?method=stopFtpRoute")

I am associating the onException() as

from(ftpUrl).routeId("FTP_ROUTE").to(fileUrl).to("bean:localRouteHelper?method=stopFtpRoute")
.onException(GenericFileOperationFailedException.class)
.handled(true)

.to("bean:optimerExceptionHandler?method=activemqException");

I am giving directory name wantedly wrong in order to check these kind of
exceptions. Please provide me help in this regard.
It just displays the exceptions but not going to bean method.

Please let me know how to handle the exceptions raised when routes are
executed in general (e.g. from jms, file etc )

Thanks


--
View this message in context: http://camel.465427.n5.nabble.com/Handling-exception-when-routes-are-processed-tp5713541.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupusers @
categoriescamel
postedMay 25, '12 at 12:12p
activeMay 25, '12 at 12:34p
posts3
users2
websitecamel.apache.org

2 users in discussion

Nafees: 2 posts Claus Ibsen: 1 post

People

Translate

site design / logo © 2022 Grokbase