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 to:
javax.jms.JMSException: Failed to build body from content. Serializable
class not available to broker. Reason: java.lang.ClassNotFoundException:
Forbidden class java.util.LinkedHashMap! This class is not trusted to be
serialized as ObjectMessage payload.

<route id="myroute"  >
<from uri="activemq:myqueue" />
<to uri="bean:myListener?method=process" />
</route>

<onException>

<exception>java.lang.Throwable</exception>
 ....
</onException>

The Exceptions happens, because the class is not known to the broker. 
In such cases of missing configuration there should be an email sent, which
is configured in the onException.

camel-version 2.17.1
activemq-version5.13.3

thanks, tippse





--
View this message in context: 
http://camel.465427.n5.nabble.com/MS-listener-Activemq-is-not-forwarding-to-onException-Clause-tp5783855.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to