Hi,

We are having trouble migrating from Camel 1.4.0 (bundled with ServiceMix
3.2.2) to Camel 1.6.0 (SMix 3.3.1). Our only difficulty is with the
exception handling.

Before calling a Camel validator, we have the following exception handling
logic:

onException(ValidationException.class).handled(false)
        
.setProperty("errorCode").constant("A001").setProperty("description").constant("Validation
Error")
                .setProperty("system").constant("ServiceMix")
                        
.to("log:ReceiveOrders.ValidationError?level=WARN&showAll=true")
.convertBodyTo(String.class).to("xslt:createExceptionMessageForClient.xsl").convertBodyTo(DOMSource.class)
                        
.to("log:ReceiveOrders.ReturnedMessage?level=WARN&showAll=true")
                                        
.to("direct:transformResponse").convertBodyTo(DOMSource.class)
                                        
.to("direct:wrapResponse").convertBodyTo(DOMSource.class)
                        
.to("log:ReceiveOrders.RouteFinished?level=WARN&showAll=true");

We need the message to be sent back on to the JBI Bus (the route starts with
a from("jbi:...") endpoint), but it is being sucked up by the
DeadLetterQueue, and the JBI client times out. With Camel 1.4.0 it worked
like a charm (of course, we had no "handled" instruction because it wasn't
supported back then), but now we can't get it to unwind the stack and return
the response to the client.

There is no errorHandler declared, only another
onException(Exception.class), which handles all unmanaged exceptions.

Having tried numerous configurations to make it work, we resort to the
wonderful & active Camel forum to shed some light on this case. Some of the
combinations we have attempted with no luck are: 

   1.  errorHandler(noErrorHandler())
   2.  putting a processor at the end to copy the in message to the out
message
   3.  encapsulating all the routing logic into another direct: route, and
calling that from within the onException.
   4. tuning the handled parameter
   5. putting transform() at the end.

Can someone give us a hand?

Many thanks!
Raul.
-- 
View this message in context: 
http://old.nabble.com/onException-not-returning-a-response-tp27629416p27629416.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to