I am going crazy over this one, spent a couple of hours on it but most likely it is due to my inexperience with the camel source code.
I thought I had reproduced the problem but now I don't any longer. Anyway, I don't get the infinity retries with 2.11-SNAPSHOT or 2.10.4 when there is an error on the replyTo on the message. (I do get it when there is an invalid replyTo configured on the endpoint itself. ) The exceptionListener is not passed into the reply when replying. It is even so that when I have an error on both the route (invalid to destination), the deadletter handler (trying to send to an WMQ error queue) succeeds but due to the error later in the reply the deadletter message does not get committed to the error queue, think the replyTo gets attached to the deadletter destination. Not sure how to proceed as of now, I guess I will have to see if it is the same using another JMS provider than IBM WebSphere MQ so I can create a junit test that works without a WMQ installation. After just briefly scanning the camel-jms source tests I didn't find a test with an invalid replyTo destination on the message as received by the jms consumer. 2013/4/13 praveenbillampati <praveenbillamp...@gmail.com> > Route is able to listen on the from queue correctly. > > I tried keeping exception listener, however it is not listening the > exception. Below is the configuration. > > package com.aaa.bbb.ccc; > import javax.jms.ExceptionListener; > import javax.jms.JMSException; > > public class JMSExceptionListener implements ExceptionListener { > public JMSExceptionListener() { > super(); > System.out.println("started exception listener"); > } > > @Override > public void onException(JMSException ex) { > System.out.println("EXCEPTION CAUGHT:::" + ex.getMessage()); > } > } > <bean id="jmsExceptionListener" > class="com.aaa.bbb.ccc.JMSExceptionListener" /> > > <bean id="jmsDestResolver" > class="org.springframework.jms.support.destination.JndiDestinationResolver" > /> > > <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" /> > > <bean id="mqConnectionFactory" > class="org.springframework.jndi.JndiObjectFactoryBean"> > <property name="jndiTemplate" ref="jndiTemplate" /> > <property name="jndiName" value="java:comp/env/jms/xyz/xyzQCF" /> > <property name="resourceRef" value="true" /> > </bean> > > <bean id="jmsTransactionManager" > class="org.springframework.jms.connection.JmsTransactionManager"> > <property name="connectionFactory" ref="mqConnectionFactory" /> > </bean> > > <bean id="mqConfig" > class="org.apache.camel.component.jms.JmsConfiguration"> > <property name="connectionFactory" ref="mqConnectionFactory" /> > <property name="transactionManager" ref="jmsTransactionManager" /> > <property name="transacted" value="true" /> > <property name="destinationResolver" ref="jmsDestResolver" /> > <property name="exceptionListener" ref="jmsExceptionListener" /> > </bean> > > <bean id="mqjms" class="org.apache.camel.component.jms.JmsComponent"> > <property name="configuration" ref="mqConfig" /> > </bean> > > I could see the initialization of exception listener, but it is not getting > invoked on the exception. > > Is this missing something? > > Thanks > Praveen > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/org-springframework-jms-InvalidDestinationException-while-trying-to-place-a-message-on-queue-tp5730697p5730796.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Brgds, Magnus Palmér