If you use a JMS destination as dead letter channel, then it only stores the message. Not the stacktrace.
If you want to include the stacktrace, you will have to put that into the message as a header yourself, and ensure the value of the header is valid according to the JMS spec, such as a java.lang.String type. See the JMS wiki page for details about mapping to/from JMS. On Tue, Dec 6, 2011 at 8:25 AM, focaldi <ferit.oca...@tav.aero> 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. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/