You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Nowakowski, Mateusz" <Ma...@sabre-holdings.com> on 2011/06/01 18:28:33 UTC
Second error handed by continued(true) doesn't work
Hi,
I have such a flow:
onException(Throwable.class)
.handled(false)
.process(logError("com.sabre.sws.ping.v2", "SWSO_Ping Camel Process Failed"))
.process(logEnd(Level.ERROR, "com.sabre.sws.ping.v2", "Camel processing has ended with error"));
//main flow
from(this.endpoint)
.process(logStart(....))
.setProperty(ORIGINAL_REQUEST_PROPERTY, body())
.to("direct:some_endpoint")
.to("direct:some_endpoint")
.setBody(property(ORIGINAL_REQUEST_PROPERTY))
.to("xslt:/......xsl")
.process(logEnd(...));
from("direct:some_endpoint")
.handleFault()
.onException(Exception.class)
.continued(true)
.process(someProcessor)
.end()
.setBody(constant(this.somePayload))
.to("xslt:/......xsl")
.to(ExchangePattern.InOut, "jbi:endpoint:https://namespace/EndpointName/endpoint")
.convertBodyTo(StringSource.class)
This line:
.to(ExchangePattern.InOut, "jbi:endpoint:https://namespace/EndpointName/endpoint")
causes error (it is a fault converted to FaultException) and it is handled (and continued) correctly.
But when I execute direct:some_endpoint for the second time I've got:
2011-06-01 18:15:40,360 [pool-flow.seda.servicemix-http-thread-5] WARN org.apache.servicemix.common.endpoints.SimpleEndpoint - SimpleEndpoint.fail called:
2011-06-01 18:15:40,376 [pool-flow.seda.servicemix-camel-thread-3] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for exchangeId: d199e82f-e497-4329-b6f4-c8fe10f003d6. Exhausted after delivery attempt: 1 caught: org.apache.servicemix.jbi.exception.FaultException: Fault occured for InOut exchange
org.apache.servicemix.jbi.exception.FaultException: Fault occured for InOut exchange
at org.apache.servicemix.camel.CamelConsumerEndpoint.processReponse(CamelConsumerEndpoint.java:149)
at org.apache.servicemix.camel.CamelConsumerEndpoint.access$100(CamelConsumerEndpoint.java:43)
at org.apache.servicemix.camel.CamelConsumerEndpoint$1.call(CamelConsumerEndpoint.java:72)
at org.apache.servicemix.camel.JbiBinding.runWithCamelContextClassLoader(JbiBinding.java:116)
at org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:70)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:588)
at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:525)
at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:632)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:185)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
2011-06-01 18:15:40,376 [pool-flow.seda.servicemix-camel-thread-3] WARN org.apache.servicemix.common.endpoints.SimpleEndpoint - SimpleEndpoint.fail called:
and no handler is invoked... the process is failing immediately.
I tried to find sth on the net, but there is some info about some seda but where is seda here?
I use
Camel 2.4.0
Within Fuse 3.5.0, but I believe it is connected to Camel not to Fuse...
Please help.
--
Regards,
Mateusz Nowakowski
RE: Second error handed by continued(true) doesn't work
Posted by "Nowakowski, Mateusz" <Ma...@sabre-holdings.com>.
>Is your JBI endpoint a Binding Component that sends the exchange on a JBI
based workflow? Is your JBI flow up and running?
Yes, the JBI is working, but it returns JBI Fault which is translated into FaultException for Camel.
I've change the Camel flow so that it uses doTry() instead of continued(true)
And now it works completely..
> Also, please set your log level to DEBUG, use a Tracer component to trace
your flow and check to see how your exception is being handled and how
messages are flowing through Camel/JBI.
I've debugged the code and I see that error is thrown after second invocation of
org.apache.servicemix.camel.CamelConsumerEndpoint.processReponse(...)
So it is a bug in Camel... I'll try to prepare complete test to show it.
--
Regards,
Mateusz Nowakowski
-----Original Message-----
From: Ashwin Karpe [mailto:akarpe@fusesource.com]
Sent: Wednesday, June 01, 2011 7:47 PM
To: users@camel.apache.org
Subject: Re: Second error handed by continued(true) doesn't work
Hi,
JBI flows/endpoints use an NMR for communication between the components, and
the NMR in JBI by default is a SEDA (java.util.concurrent.BlockingQueue)
based implementation.
Is your JBI endpoint a Binding Component that sends the exchange on a JBI
based workflow? Is your JBI flow up and running?
Also, please set your log level to DEBUG, use a Tracer component to trace
your flow and check to see how your exception is being handled and how
messages are flowing through Camel/JBI.
http://camel.apache.org/tracer.html http://camel.apache.org/tracer.html
Cheers,
Ashwin...
-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com
Blog: http://opensourceknowledge.blogspot.com
CamelOne 2011: http://fusesource.com/camel2011
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/Second-error-handed-by-continued-true-doesn-t-work-tp4445730p4445908.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Second error handed by continued(true) doesn't work
Posted by Ashwin Karpe <ak...@fusesource.com>.
Hi,
JBI flows/endpoints use an NMR for communication between the components, and
the NMR in JBI by default is a SEDA (java.util.concurrent.BlockingQueue)
based implementation.
Is your JBI endpoint a Binding Component that sends the exchange on a JBI
based workflow? Is your JBI flow up and running?
Also, please set your log level to DEBUG, use a Tracer component to trace
your flow and check to see how your exception is being handled and how
messages are flowing through Camel/JBI.
http://camel.apache.org/tracer.html http://camel.apache.org/tracer.html
Cheers,
Ashwin...
-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com
Blog: http://opensourceknowledge.blogspot.com
CamelOne 2011: http://fusesource.com/camel2011
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/Second-error-handed-by-continued-true-doesn-t-work-tp4445730p4445908.html
Sent from the Camel - Users mailing list archive at Nabble.com.