Hello Readers!

Inside the route combined with the DefaultErrorHandler we are using
exception policies. 
When an exception is thrown that part is even called but the exception
object is null:

.onException(Exception.class).handled(true)
        .process(new Processor() {
          @Override
          public void process(Exchange exchange) throws Exception {
                exchange.getIn().setBody(exchange.getException()); // why 
exception is
null ???
          }
        })
        .to("activemq:queue:" + JmsDestinations.QUEUE_LOG_SERVICE)
.end()

On the other side the jms consumer is used to take the exchange and finally
logs the stack trace via 
camel log component:

from("activemq:queue:" +
JmsDestinations.QUEUE_LOG_SERVICE).routeId("logServiceRoute")
       
.to("log:errorLog?level=ERROR&showAll=true&multiline=true&showStackTrace=true");

What is the right way to log the stack trace into the log file by the camel
log component? But
take into account that JMS is in use.

We are using version 2.10.0 .

Cheers
Hilde



--
View this message in context: 
http://camel.465427.n5.nabble.com/Exception-in-Exchange-is-null-tp5717324.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to