Re: Camel 2 -> 3 migration. OnException & OSGI Classloading

2024-01-25 Thread Paul McCulloch
Following up for posterity... The workaround I'm going with is to create a per bundle CamelContext using Blueprint. Each module adds routes to its own context and the onException handlers can see the appropriate Exception classes. Messages are passed to the core application's context using the vm

Camel 2 -> 3 migration. OnException & OSGI Classloading

2024-01-22 Thread Paul McCulloch
Hi, I'm currently migrating an OSGI application from Camel 2.25 to 3.21. I've encountered a change in the way onException deals with the type it's asked to handle in an OSGI environment. In 2.25 the OnExceptionDefinition instance keeps a reference to the classes it's asked to handle

Documentation on onException and exception handling behavior

2022-09-16 Thread Anthony Wu
Hi folks, In reading the following: https://camel.apache.org/manual/exception-clause.html#_how_does_camel_select_which_clause_should_handle_a_given_thrown_exception - the order in which the onException is configured takes precedence. Camel will test from first…last defined

Re: onException and onCompletion clauses used together

2022-08-12 Thread Karen Lease
r in the logs, to be attempted to be redelivered. I added onException part to the route with onWhen that determines if an error should be ignored and the exception is marked as handled. The point was to avoid such errors being logged and propagated for handling. The behavior I witnessed in this ca

onException and onCompletion clauses used together

2022-08-08 Thread Eduard Gomoliako
onException part to the route with onWhen that determines if an error should be ignored and the exception is marked as handled. The point was to avoid such errors being logged and propagated for handling. The behavior I witnessed in this case, suggests that once a route gets an exception marked

Re: Modify Exchange for route onException errorhandler when using useOriginalMessage

2021-01-20 Thread Claus Ibsen
When using transactions, do you mean transacted() in the route (eg transaction error handler) Then the point of that is that it either commit or rollback. And that you often have some transaction support from the external system, like JMS, JDBC, etc. Then you should not really use onException

Modify Exchange for route onException errorhandler when using useOriginalMessage

2021-01-18 Thread Marcus Ionker
Hello, I have a main processing route with multiple onException clauses with useOriginalMessage. So that the errorhandler route knows what error occurred in the main processing route, I wanted to set a onPrepareFailure. Unfortunately you cannot set this value in the onException clause

RE: OnException and StreamCaching

2020-10-29 Thread Shenavai, Manuel
Thanks! -Original Message- From: Claus Ibsen Sent: Mittwoch, 28. Oktober 2020 15:37 To: users@camel.apache.org Subject: Re: OnException and StreamCaching On 2.x you can set the exchange property with key Exchange.REDELIVERY_EXHAUSTED On Mon, Oct 26, 2020 at 4:44 PM Shenavai, Manuel

Re: OnException and StreamCaching

2020-10-28 Thread Claus Ibsen
://github.com/apache/camel/commit/4cd127eef9f919b36dc761fc495e284e5582663c#diff-9e035215aa8ee92dbb890dc7fe58f4159deb5f2ccf95ed981b0d2b0ed044e8e9R817 > > Thanks in advance & > Best regards, > Manuel > > -Original Message- > From: Shenavai, Manuel > Sent: Freitag, 9. Oktober 2020 14:47 >

RE: OnException and StreamCaching

2020-10-26 Thread Shenavai, Manuel
From: Shenavai, Manuel Sent: Freitag, 9. Oktober 2020 14:47 To: users@camel.apache.org Subject: [CAUTION] RE: OnException and StreamCaching Hi Claus, thanks for confirming. I created a Jira for it: https://issues.apache.org/jira/browse/CAMEL-15665 Best regards, Manuel -Original Message-

RE: OnException and StreamCaching

2020-10-09 Thread Shenavai, Manuel
Hi Claus, thanks for confirming. I created a Jira for it: https://issues.apache.org/jira/browse/CAMEL-15665 Best regards, Manuel -Original Message- From: Claus Ibsen Sent: Freitag, 9. Oktober 2020 13:52 To: users@camel.apache.org Subject: Re: OnException and StreamCaching Hi Ah

Re: OnException and StreamCaching

2020-10-09 Thread Claus Ibsen
Hi Ah thanks for bringing this up. Yeah its a little bug, we should make that stream caching more robust. You are welcome to create a JIRA On Wed, Oct 7, 2020 at 4:07 PM Shenavai, Manuel wrote: > > Hi everyone, > > > > we are using the Camel-onException error

OnException and StreamCaching

2020-10-07 Thread Shenavai, Manuel
Hi everyone, we are using the Camel-onException error handling and found that the exception-handling is sometimes not executed in case of error. When StreamCaching is enabled in the route and an error happens during TypeConversion (see stacktrace below), the exception handling is not executed

Re: Rolling back transaction with custom error message using onException

2020-09-22 Thread Reji Mathews
2020 at 6:01 PM Reji Mathews > wrote: > > > > Hello community > > > > I have a requirement > > - Route needs to be transacted : If some failure happens, jdbc > operation > > should be rolled-back > > - I need to send back a custom error message to

Re: Rolling back transaction with custom error message using onException

2020-09-22 Thread Claus Ibsen
ed-back > - I need to send back a custom error message to API caller. (am trying to > do do that in onException) > > But, I see the transaction rollback doesn't work if I use handled=true in > the onException block. > Alternatively, it works flawlessly if I flip it to false, but I get u

Rolling back transaction with custom error message using onException

2020-09-22 Thread Reji Mathews
Hello community I have a requirement - Route needs to be transacted : If some failure happens, jdbc operation should be rolled-back - I need to send back a custom error message to API caller. (am trying to do do that in onException) But, I see the transaction rollback doesn't work if I use

RE: errorHandler + onException

2020-05-28 Thread Shultz, Dmitry
54 [main] INFO route6 - token is good I.e. route2 is started twice before getting into the doCatch() code. Im curious why this is happening? Cheers, Dmitry -Original Message- From: Shultz, Dmitry Sent: Wednesday, May 27, 2020 3:26 PM To: users@camel.apache.org Subject: RE: errorHandl

RE: errorHandler + onException

2020-05-27 Thread Shultz, Dmitry
rorHandler + onException Hi All, What is the best way to handle the situation when there is a need to automatically adjust the exchange as part of the error handling and proceed with retry? For example, there is a route1 that invokes route2 with the 'token' property set. When, during

errorHandler + onException

2020-05-27 Thread Shultz, Dmitry
there is a failure (401 http error) I want to reset the token property value and make route1 to do the retry (with the updated property). Here is the sample route that doesn't work (onException never called): public class ErrorHandlingTest extends CamelTestSupport { @Test public void runIt

logging inside global onException block with multiple logger names

2020-04-06 Thread Gv, Shivakumar
Hi Team, We have setup separate log4j logger names for each route inside camel context. We have common exception block and we have set the logger name in exchange property . Is there a way to set the logger name from property or header without calling a bean method in below case. Not

Re: OnException block to figured out where the Exception is originated from

2019-08-29 Thread Wang Yan
el has sent the exchange to, hence > I > think you would see this information after a `to` route. However I am not > 100% sure though. > > On Wed, 28 Aug 2019 at 07:38, Wang Yan <[hidden email] > <http:///user/SendEmail.jtp?type=node=5841999=0>> wrote: > > > He

Re: OnException block to figured out where the Exception is originated from

2019-08-28 Thread Omar Al-Safi
`Exchange.FAILURE_ENDPOINT` will contain the information about the last time Camel has sent the exchange to, hence I think you would see this information after a `to` route. However I am not 100% sure though. On Wed, 28 Aug 2019 at 07:38, Wang Yan wrote: > Hello all, > > > OnExc

OnException block to figured out where the Exception is originated from

2019-08-27 Thread Wang Yan
Hello all, OnException block , the TechnicalException will be caught, this exception could come from Route A or Route B , my question is , Is it possible for on Exception block to figure out where the TechnicalException is originated from ? for example from which Route or from which Endpoint

http://camel.465427.n5.nabble.com/exchange-getIn-setBody-does-not-work-for-OnException-block-tc5838544.html

2019-07-18 Thread Wang Yan
@ Claus Thanks for your quick reply. i used exchange.getMessage(), it does not work it prints out below information , what i expected result should be "Error happened , please contact Admin" ### This page contains the following errors: error on line 1 at column 1:

Re: exchange.getIn().setBody() does not work for OnException block

2019-07-17 Thread Claus Ibsen
of exchange, we should use exchange.getIn().setBody() > instead of exchange.getOut().setBody() > > It ususally works. but for OnException block, it does not work , I have to > use exchange.getOut().setBody > Any hints are more than suggest or hints are more than welcome! > > &g

exchange.getIn().setBody() does not work for OnException block

2019-07-17 Thread Wang Yan
According to document ( https://camel.apache.org/using-getin-or-getout-methods-on-exchange.html), when we modify body of exchange, we should use exchange.getIn().setBody() instead of exchange.getOut().setBody() It ususally works. but for OnException block, it does not work , I have to use

Re: onException - properties and headers are lost

2018-06-05 Thread Balazs Szeti
Hi Reji, You can use useOriginalMessage() <https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionUseOriginalMessageTest.java> in onException to restore the original message body you received at from(). Like this: onExc

onException - properties and headers are lost

2018-06-05 Thread Reji Mathews
Hi guys I have a business requirement where if an api call fails, I need to store the payload in a database for future retry. I have an onException clause like this onException(java.net.SocketException.class) .handled(true) .maximumRedeliveries(3) .log("Re

processor not invoke from onException for exception raised from custom load balancer

2017-11-21 Thread 23patel patel
I have a processor which is called OnException .However when custom load balancer raises httpconnect exception the process associated with Exception is not raised. Below is the configuration http://camel.apache.org/schema/spring; streamCache="true" typeConverterStatisticsEna

Re: onCompletion doesn't get executed when onException handler is triggerred

2017-10-18 Thread Mary Cochran
Have you tried externalizing the onCompletion(), such as putting this as a separate statement above your route and below the onException() onCompletion() .log("parallel processing is done") .setBody(constant(null)).to("direct:c"); Mary Mary Cochran Red

Re: onCompletion doesn't get executed when onException handler is triggerred

2017-10-11 Thread LiQiang Ye
ot; + reloadInterval) > .multicast().parallelProcessing() > .to("direct:a", "direct:b") > .end() > .onCompletion() > .log("parallel processing is done").setBody(constant(null)).to("direct:c") > > -- > > from("direct:a") > .onException(Exception.class) > .maximumRedeliveries(3) > .redeliveryDelay(1000) > .backOffMultiplier(2) > .retryAttemptedLogLevel(LoggingLevel.WARN) > .handled(true) > .end() > .to("bean:aBean?method=setData") > > Thanks >

onCompletion doesn't get executed when onException handler is triggerred

2017-10-10 Thread LiQiang Ye
ot;parallel processing is done").setBody(constant(null)).to("direct:c") -- from("direct:a") .onException(Exception.class) .maximumRedeliveries(3) .redeliveryDelay(1000) .backOffMultiplier(2) .retryAttemptedLogLevel(LoggingLevel.WARN) .handled(true) .end() .to("bean:aBean?method=setData") Thanks

Re: Re: OnException - out body length limited by input body length

2017-09-27 Thread Martin Lichtin
Thanks, that did the trick. About request (and also Camel) headers leaking into the http response, is there support from the framework in some way? What I currently use is a custom HeaderFilterStrategy to suppress all the various headers that should not be returned to the caller, such as all

Re: OnException - out body length limited by input body length

2017-09-25 Thread Claus Ibsen
Remove the Content-Length header when you change the body On Mon, Sep 25, 2017 at 2:47 PM, Martin Lichtin wrote: > Using an to handle an exception, I want to mark the situation > as 'handled' and set the body with information from the exception. Eg: > > >

OnException - out body length limited by input body length

2017-09-25 Thread Martin Lichtin
Using an to handle an exception, I  want to mark the situation as 'handled' and set the body with information from the exception. Eg:       java.lang.Exception       false         500         ${exception.stacktrace}            Problem is: the body

Re: onException() Redelivery to parent route

2017-06-14 Thread barthorre
Hi, have a look at this article: http://camel.apache.org/how-do-i-retry-processing-a-message-from-a-certain-point-back-or-an-entire-route.html -- View this message in context: http://camel.465427.n5.nabble.com/onException-Redelivery-to-parent-route-tp5803518p5803632.html Sent from the Camel

Re: onException() Redelivery to parent route

2017-06-14 Thread Bart Horré
direct:domore", most likely cause is a > race condition and id is not "yet" present and is null. At this point, i > want to restart the parent route. i.e. from("sql:...) which a re delivery > delay. > > how can i specify on exception clause? > > Thanks, > >

onException() Redelivery to parent route

2017-06-13 Thread sap
omore", most likely cause is a race condition and id is not "yet" present and is null. At this point, i want to restart the parent route. i.e. from("sql:...) which a re delivery delay. how can i specify on exception clause? Thanks, -- View this message in context: http://came

Re: Re: In 'onException' - how to decide per-message whether to 'continue' route or not

2017-05-20 Thread Martin Lichtin
Thanks, onWhen pointed me into the right direction. I can use a predicate like: rd.onException(Exception.class).continued(new Predicate() { @Override public boolean matches(Exchange exchange) { return myDecision(exchange); } }) On

Re: In 'onException' - how to decide per-message whether to 'continue' route or not

2017-05-13 Thread Claus Ibsen
You can add onWhen where you can do a predicate to decide that per message On Sat, May 13, 2017 at 9:00 AM, Martin Lichtin wrote: > One can define a route exception handling to catch and continue: > >

In 'onException' - how to decide per-message whether to 'continue' route or not

2017-05-13 Thread Martin Lichtin
One can define a route exception handling to catch and continue: rd.onException(Exception.class).continued(true).process(myExceptionHandler) However, how can one decide on a per-message basis (ie. in myExceptionHandler) whether to continue with the route or not? Thanks - Martin

Re: Bug in onException with onRedelivery

2017-05-09 Thread Ryan T
om/Bug-in-onException-with-onRedelivery-tp5798549p5799178.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Bug in onException with onRedelivery

2017-05-08 Thread Tadayoshi Sato
Hi, I would first check if AnotherException is really thrown from MyProcessor. On Thu, May 4, 2017 at 1:35 AM, Ryan T <brat...@yahoo.com> wrote: > Can someone verify that this is a bug or not? > > > > -- > View this message in context: http://camel.465427.n5.nabble.

Re: Bug in onException with onRedelivery

2017-05-03 Thread Ryan T
Can someone verify that this is a bug or not? -- View this message in context: http://camel.465427.n5.nabble.com/Bug-in-onException-with-onRedelivery-tp5798549p5798619.html Sent from the Camel - Users mailing list archive at Nabble.com.

Bug in onException with onRedelivery

2017-05-01 Thread Ryan T
. Based on the code I expected "*** AnotherException happened." not "*** YetAnotherException happened." Can anyone explain why I got the "*** YetAnotherException happened." result? -- View this message in context: http://camel.465427.n5.nabble.com/Bug-in

Re: Using rollback() inside onException

2017-04-01 Thread Martin Lichtin
Thanks, indeed it all works as expected without using rollback(). I had cases of onException().handled(true)rollback().end() that could be simplified to onException()end(). On 31.03.2017 17:10, Quinn Stevenson wrote: I don’t this this would make sense for handling java.lang.Exception

Re: Using rollback() inside onException

2017-03-31 Thread Quinn Stevenson
tin <lich...@yahoo.com.INVALID> wrote: > > Hi > Wanted to ask, what would be a reason to explicitly call rollback() in an > onException(). > > For example, would this make sense? > > > .onException(Exception.class).rollback().end() > > I'm under the ex

Using rollback() inside onException

2017-03-31 Thread Martin Lichtin
Hi Wanted to ask, what would be a reason to explicitly call rollback() in an onException(). For example, would this make sense? .onException(Exception.class).rollback().end() I'm under the expression above line could just be left out, as Camel anyway lets the exception up

onException not getting called - only newly added onException does

2017-03-24 Thread bocamel
be greatly appreciated. -- View this message in context: http://camel.465427.n5.nabble.com/onException-not-getting-called-only-newly-added-onException-does-tp5796106.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: onException change redeliveryPolicy at runtime

2017-02-28 Thread Marco Nicoletti
I have got the first edition of your book -- View this message in context: http://camel.465427.n5.nabble.com/onException-change-redeliveryPolicy-at-runtime-tp5794550p5794557.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: onException change redeliveryPolicy at runtime

2017-02-28 Thread Claus Ibsen
ocessor, then I have the exchange I can manipulate, > and then? > > Sorry and thanks so much! > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/onException-change-redeliveryPolicy-at-runtime-tp5794550p5794553.html > Sent from the

Re: onException change redeliveryPolicy at runtime

2017-02-28 Thread Marco Nicoletti
Can you be more precise, please. I know I can define a processor, then I have the exchange I can manipulate, and then? Sorry and thanks so much! -- View this message in context: http://camel.465427.n5.nabble.com/onException-change-redeliveryPolicy-at-runtime-tp5794550p5794553.html Sent from

Re: onException change redeliveryPolicy at runtime

2017-02-28 Thread Claus Ibsen
redeliveryDelay="4000"/> > > > > > > I would like to change maximumRedeliveries and redeliveryDelay at runtime: > how is it possible with Camel? > > Thanks so much > > > > -- > View this message in context: > h

onException change redeliveryPolicy at runtime

2017-02-28 Thread Marco Nicoletti
with Camel? Thanks so much -- View this message in context: http://camel.465427.n5.nabble.com/onException-change-redeliveryPolicy-at-runtime-tp5794550.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2016-11-30 Thread vassilis
(TransactionStatus status) { // here the Camel processors and whatever is in the Route definition is executed // AND the OnException() handling! // this is executed within a transaction } } Also the code of the *transactionTemplate.execute()* that executes the above Callback. public T execute

Re: Problem with exception handler (onException) on Camel 2.12.X routes.

2016-11-30 Thread vassilis
Hi, It seems I have the same issue with Camel 22.15.1.redhat-621159. Did you find a proper solution? Just to be more specific, in my case OnException is executed fine if an exception is thrown in the route, BUT it is not executed in cases when the Database is down and no transaction can be even

Re: OnException across camelcontext not called when using direct-vm

2016-10-26 Thread Santhosh
w: > http://camel.465427.n5.nabble.com/OnException-across-camelcontext-not-called-when-using-direct-vm-tp5789237p5789309.html > To unsubscribe from OnException across camelcontext not called when using > direct-vm, click here. > NAML -- View this message in context: http://camel.

Re: OnException across camelcontext not called when using direct-vm

2016-10-26 Thread Santhosh
Ok That solves the problem. -- View this message in context: http://camel.465427.n5.nabble.com/OnException-across-camelcontext-not-called-when-using-direct-vm-tp5789237p5789309.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OnException across camelcontext not called when using direct-vm

2016-10-25 Thread Quinn Stevenson
orks fine. > > Thanks > Santhosh > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/OnException-across-camelcontext-not-called-when-using-direct-vm-tp5789237p5789247.html > Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OnException across camelcontext not called when using direct-vm

2016-10-25 Thread Santhosh
/OnException-across-camelcontext-not-called-when-using-direct-vm-tp5789237p5789247.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: OnException across camelcontext not called when using direct-vm

2016-10-25 Thread Quinn Stevenson
eption > correctly to the parent/source route. If I use nmr, then source route gets > the exception and onException is getting called correctly. > > Here in this example > > xmlns="http://camel.apache.org/schema/spring;> > > >ja

OnException across camelcontext not called when using direct-vm

2016-10-25 Thread Santhosh
I have multiple context, and I use direct-vm to call route in another context. If there any exception, direct-vm is not passing that exception correctly to the parent/source route. If I use nmr, then source route gets the exception and onException is getting called correctly. Here in this example

Re: No HTTP response when using onException with BeanValidationException

2016-10-15 Thread Remco Schoen
Hi, I did a little more testing and found that there seems to be a conflict in the headers. When I add this to the XML it works: http://remco.local:8080/custom_webapi/hello/world, CamelServletContextPath=/custom_webapi/hello/world, Connection=keep-alive, Content-Length=3,

No HTTP response when using onException with BeanValidationException

2016-10-14 Thread Remco Schoen
Hi, I’m trying to use the REST DSL and do validation on the incoming object with the Bean Validation Component. I have configured my Spring XML like this: org.apache.camel.component.bean.validator.BeanValidationException true 422 Validation

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-27 Thread Brad Johnson
e. > com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException- > tp5787900p5788085.html > Sent from the Camel - Users mailing list archive at Nabble.com. >

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-27 Thread ncsibra
tracker as far as I see, they don't really check this thread. -- View this message in context: http://camel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900p5788085.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-26 Thread Brad Johnson
n with weaveAddFirst is better in my case. > > > > -- > View this message in context: http://camel.465427.n5.nabble. > com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException- > tp5787900p5788046.html > Sent from the Camel - Users mailing list archive at Nabble.com. >

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-26 Thread ncsibra
-onException-tp5787900p5788046.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-26 Thread ncsibra
mel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900p5788045.html Sent from the Camel - Users mailing list archive at Nabble.com.

weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread Minh Tran
Hi I use the advice stuff quite extensively but never weaveAddFirst though. I do see the kind of exceptions you are seeing from time to time and it's probably a bug. I generally find the workaround is to use weaveById. I think it has a lot less trouble finding the node to weave at if you just

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread Brad Johnson
somebody confirm that am I doing something wrong or is this really a > bug? > > > > -- > View this message in context: http://camel.465427.n5.nabble. > com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException- > tp5787900p5787949.html > Sent from the Camel - Users mailing list archive at Nabble.com. >

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread ncsibra
Can somebody confirm that am I doing something wrong or is this really a bug? -- View this message in context: http://camel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900p5787949.html Sent from the Camel - Users mailing list archive

Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-21 Thread ncsibra
le.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900p5787901.html Sent from the Camel - Users mailing list archive at Nabble.com.

weaveAddFirst doesn't work correctly with route level onException

2016-09-21 Thread ncsibra
Hi, I'm using camel version 2.17.1 and I have some problem with the weaveAddFirst method. When a route level onException clause exist and only one advice added or multiple advice added, but the first one contains the weaveAddFirst method, then camel will throw an exception

onException documentation error?

2016-08-04 Thread James Green
onse to the caller. First we setup our routing as:" [ skip code ] I've written a test that shows that the caller does not receive anything at all. In fact, the only circumstances in which the Exchange propagates beyond the onException rules are: 1. Where continued is set and the Exchange wi

Re: Onexception and try catch block in camel.

2016-06-13 Thread Quinn Stevenson
I’d suggest you read the “Error Handling” chapter in “Camel in Action” - it covers onException very well. For me, I use onException wherever possible - it allows me to use error handlers and exception policies which make my life much easier, and it separates the error handling logic from

MS listener (Activemq) is not forwarding to onException-Clause

2016-06-10 Thread tippse
I wonder why the RuntimeCamelException ist not caught in the global onException Clause. But Exceptions in the myListener-Bean are forwarded as expected. Exception: Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - Failed to extract body due

OnException and enrich - fail

2016-06-06 Thread Costash
a new token) and redeliver. The problem: when the "enrich" must be called, actually it pass over it and of course the farther call (when redelivery is done) with fail because old token is provided again. the code looks like: *onException*(HttpOperationFailedException.class)

IdempotentRepository key removal within OnException

2016-04-25 Thread mike.cunningham...@gmail.com
Hi, I have the below routes setup. The behaviour that I am noticing is that the key within the Idempotent Repository is not being removed when an exception is thrown when using the 'seda' component in the OnException (on line stated below). If I change to use 'direct' instead of 'seda' within

OnException Not returning a custom Response

2016-04-07 Thread rahultaneja
tring logEndpoint = "log:" + XXX() + "?level=DEBUG"; from(endpointUri) .to(logEndpoint).to(ROUTE2.ENDPOINT_URI) .to(logEndpoint); } Second Route:(In second route , I am catching some exception through onException) public class Ro

Re: onException not working

2016-03-23 Thread Claus Ibsen
Camel uses slf4j-api so you can configure it to use any other logging library you use. http://www.slf4j.org/manual.html On Thu, Mar 24, 2016 at 4:10 AM, mayur_bm <mayur...@gmail.com> wrote: > Thank you :) > > if i mention like " java.lang.Exception" in > onExceptio

Re: onException not working

2016-03-23 Thread mayur_bm
Thank you :) if i mention like " java.lang.Exception" in onException, does it handles all kind of exceptions derived from it?( for ex: NullPointerException, IOException etc) here my application already has logging framework, i want to redirect all Camel Traces in to same trace fil

Re: onException not working

2016-03-23 Thread Quinn Stevenson
for that. > On Mar 23, 2016, at 2:45 AM, mayur_bm <mayur...@gmail.com> wrote: > > Hi, > > i have onException configured for my camel context, which has couple of > routes. i have configured onException as below: > > >java.lang.

onException not working

2016-03-23 Thread mayur_bm
Hi, i have onException configured for my camel context, which has couple of routes. i have configured onException as below: java.lang.Exception true ${exception.stacktrace} here since my component

Re: Unable to handle CXFRS exception using onException

2016-02-24 Thread Sergey Beryozkin
eImpl" loggingFeatureEnabled="true" loggingSizeLimit="20"> -- View this message in context: http://camel.465427.n5.nabble.com/Unable-to-handle-CXFRS-exception-us

Re: Unable to handle CXFRS exception using onException

2016-02-24 Thread M.Ismail
-- View this message in context: http://camel.465427.n5.nabble.com/Unable-to-handle-CXFRS-exception-using-onException-tp5778104p5778217.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unable to handle CXFRS exception using onException

2016-02-23 Thread Sergey Beryozkin
Hi The escaped exception can indeed be handled by CXF fault interceptors, but also by JAX-RS ExceptionMapper, and on the client side, by ResponseExceptionMapper. I'm not sure why onException is not triggered (you said below that it actually goes into onException but the subject implies

Unable to handle CXFRS exception using onException

2016-02-23 Thread M.Ismail
Hi, I'm using Camel 2.12.0 in OSGI container. I am using cxfrs as a consumer but I can't handle javax.xml.stream.XMLStreamException which is thrown by cxfrs in case failure to parse the request. If I throw the exception XMLStreamException it goes to onException though. I read that cxf can use

Re: onException block in camel 2.16.1

2016-02-05 Thread Claus Ibsen
>> >> Setting the logging level off works fine: >> >> >> >> > >> logName="LoggingErrorHandler" level="OFF"/> >> >> >> >> And also doTry/doCatch work: the exception won't go the the error >> handler >>

Re: onException block in camel 2.16.1

2016-02-05 Thread Andreas Siepert
gt; > >> >> logName="LoggingErrorHandler" level="OFF"/> > >> > >> And also doTry/doCatch work: the exception won't go the the error > handler > >> from the catch block. > >> > >> But: it this a bug or a feature?

Re: onException block in camel 2.16.1

2016-02-05 Thread Claus Ibsen
dler >> from the catch block. >> >> But: it this a bug or a feature? I really don't like a behaviour that I >> don't understand. >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/onException-block-i

Re: onException block in camel 2.16.1

2016-02-02 Thread Andreas Siepert
h work: the exception won't go the the error handler > from the catch block. > > But: it this a bug or a feature? I really don't like a behaviour that I > don't understand. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/onException-block-in

Re: onException block in camel 2.16.1

2016-02-02 Thread lw
Awesome! Your solution works much cleaner! Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/onException-block-in-camel-2-16-1-tp5777019p5777165.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: onException block in camel 2.16.1

2016-02-01 Thread lw
I got the defaultErrorHandler to collapse with these 2 adjustments: - set messageHistory="false" on CONTEXT - set logStackTrace="false" for onException block, like this: The timestamp with default error handler still shows up, but much easier on the eye. I tried

Re: onException block in camel 2.16.1

2016-02-01 Thread TygerC
.nabble.com/onException-block-in-camel-2-16-1-tp5777019p5777131.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: onException block in camel 2.16.1

2016-01-30 Thread Andreas Siepert
quot; <sue...@iki.fi>: > I was going to post the same question since the behaviour is a bit > puzzling. > > Why is it working now this way? I couldn't find any documentation regarding > the matter. > > > > -- > View this message in context: > http://camel.465

Re: onException block in camel 2.16.1

2016-01-30 Thread TygerC
I was going to post the same question since the behaviour is a bit puzzling. Why is it working now this way? I couldn't find any documentation regarding the matter. -- View this message in context: http://camel.465427.n5.nabble.com/onException-block-in-camel-2-16-1-tp5777019p5777044.html

Re: onException block in camel 2.16.1

2016-01-30 Thread Andreas Siepert
ng. >> >> Why is it working now this way? I couldn't find any documentation >> regarding >> the matter. >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/onException-block-in-camel-2-16-1-tp5777019p5777044.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >

onException block in camel 2.16.1

2016-01-29 Thread lw
Hello, I'm testing functionality of my existing files from camel 2.14 on updated camel 2.16.1 version. It appears that camel DefaultErrorHandler responds to the error after the error is handled by onException block. In console I see my error handled message + new timestamp with the full trace

Re: onException block in camel 2.16.1

2016-01-29 Thread Claus Ibsen
. It appears that camel DefaultErrorHandler > responds to the error after the error is handled by onException block. In > console I see my error handled message + new timestamp with the full trace > of the same error coming from DefaultErrorHandler. I'd like to turn off > default full trace

  1   2   3   4   5   6   >