You are using the jms endpoint to receive the message, you need to enable the transferExchange option and make sure your exceptions are serializable.

On Tue Dec  6 15:25:42 2011, focaldi wrote:
Thanks my friends, but it didnt work :(

In my main classs :
...
camelContext.setHandleFault(true);
...

My Dead Letter Queue URL :

jms:queue:deadletterqueue


Dead Letter Queueu Processor :
from("jms:queue:deadletterqueue").process(new ProcessorForSendingEmail ());

Processor class for deadletterqueue :

@Component("ProcessorForSendingEmail")
public class ProcessorForSendingEmail implements Processor {

        @Override
        public void process(Exchange exchange) {                
                Throwable exception =
exchange.getProperty(Exchange.EXCEPTION_CAUGHT,Throwable.class);
                System.out.println("HATAAAAAAAAAA :"+exception);              
        }

}

For test I throw an exception from a proccessor :

@Component("Test3")
public class Test3 implements Processor {
        
        @Override
        public void process(Exchange exchange) throws Exception {
                if (1==1) throw new Exception("BENDEEEEEEEEEE");
                exchange.getIn().setHeader("IB.messageName", "rmsPlstAssign");
        }

}

Result : HATAAAAAAAAAA :null

I NEED EXCEPTION MESSAGE... Please help me :(

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-handle-exception-message-tp5051151p5051266.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to