camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rvdlinden <>
Subject Re: Camel logs whole message body in case of org.apache.camel.CamelExchangeException "Cannot write body:"
Date Thu, 09 Jun 2016 20:00:45 GMT
Thanks for your reply. When i look into the source code of the
org.apache.camel.component.mina2.Mina2Helper, from which this
CamelExchangeException originates, i see that writeBody() includes the body
to the Exception's message String. Maybe i'm missing something, but I don't
see how a setting on the Error Handler could fix that without omitting the
whole exception message. We do use Camel 2.17, yet it logs the full message
body in the case of this exception.

I think what's left for us is either to somehow catch all
CamelExchangeExceptions, match for the 'cannot write body' in the
Exception's message string and throw a filtered exception that does not
contain the message's body; or not use Mina2, but use a different transport
library (we're actually considering camel-mllp, but that needs more
research). Do you see any other possibility to solve this?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message