camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narita Bagchi <Narita.Bag...@headstrong.com>
Subject RE: Error -> onException must be defined before any routes in the RouteBuilder
Date Thu, 23 Feb 2012 16:11:44 GMT
Yes. I figured out the problem just now. The context was the difference. This error is gone
now.

Thanks.
Regards,
Narita

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: Thursday, February 23, 2012 9:39 PM
To: users@camel.apache.org
Subject: Re: Error -> onException must be defined before any routes in the RouteBuilder

Hi

OnException can be defined at two scopes
a) CamelContext scope
b) Route scope

For (a) you have to define them before any routes.

And for (b) you have to define them inside the route, but in the start of the route.



On Thu, Feb 23, 2012 at 4:39 PM, Narita Bagchi <Narita.Bagchi@headstrong.com> wrote:
> Why would I probably be getting " onException must be defined before any routes in the
RouteBuilder " exception ?
>
> I wrote a small exercise and found out that we can have the OnException defined at the
beginning of the Route Building, which basically defines the scope of the OnException to become
"Global" and gets applicable to all routes in the flow. The exercise proves that OnException
defined at the beginning becomes a part of every route, basically. Then why get the first
error?
>
> Thanks.
>
>
> ________________________________
> ***The information transmitted is intended only for the person or
> entity to which it is addressed and may contain confidential and/or
> privileged material. Any review,retransmission,dissemination or other
> use of, or taking of any action in reliance upon, this information by
> persons or entities other than the intended recipient is prohibited.
> If you received this in error, please contact the sender and delete
> the material from any computer.***



--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

***The information transmitted is intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material. Any review,retransmission,dissemination
or other use of, or taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.***

Mime
View raw message