camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zied123456 <>
Subject Handle Mail exception
Date Tue, 20 Oct 2015 14:03:50 GMT
I want to write the excpetion in a file :

*This is the route:*

<bean id="myExceptionHandler"

<route id="routeread">
<from uri="imap://URi?consumer.exceptionHandler=#myExceptionHandler"/>

this is what i set in *myExceptionHandler class:*

public class MyExceptionHandler implements ExceptionHandler {
	private ProducerTemplate template;
        public void *handleException*(String message,Throwable exception) {
		 handleException(exception.getMessage(), null, exception);  

	 public void *handleException*(final String message, final Exchange
originalExchange, final Throwable exception) {
		template.send("file://mail?fileName=mailtext3.txt", new Processor() {
            public void process(Exchange exchange) throws Exception {

 But it doesn't work got this error message:

WARN  Error handling exception. This exception will be ignored.

How can i fix it ?

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

View raw message