activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan Long <bren...@realgo.com>
Subject Re: Execution of JMS message listener failed, and no ErrorHandler has been set.
Date Mon, 23 May 2011 14:43:27 GMT
I tried setting the exception listener on the JmsConfiguration bean but
I still get "Execution of JMS message listener failed, and no
ErrorHandler has been set."


On 5/23/2011 5:48 AM, Gary Tully wrote:
> I wonder about the execution order of the property setters:
>
> <property name="configuration" ref="jmsMediaTransferConfig"/>
> <property name="exceptionListener" ref="exampleExceptionListener"/>
>
> the exceptionListener accessor delegates to getConfiguration().set...
>
> so if "configuration" is set after the exceptionListener it will override.
>
> One way to eliminate this possibility is to set the exceptionListener
> on your jmsMediaTransferConfig bean.
>
> On 20 May 2011 16:34, Brendan Long <brendan@realgo.com> wrote:
>> Hi,
>>
>> I'm just wondering if there's any way to get rid of this message:
>>
>> WARN  org.apache.camel.component.jms.JmsMessageListenerContainer -
>> Execution of JMS message listener failed, and no ErrorHandler has been set.
>>
>> I tried setting an error handler on my ActiveMQComponent:
>>
>> <bean id="exampleExceptionListener" class="com.example.ExceptionListener"/>
>> <bean id="activemq"
>> class="org.apache.activemq.camel.component.ActiveMQComponent">
>>    <property name="configuration" ref="jmsMediaTransferConfig"/>
>>    <property name="exceptionListener" ref="exampleExceptionListener"/>
>> </bean>
>>
>> That didn't seem to have any effect. I also have a LoggingErrorHandler
>> for the route (with its own annoying stack traces), and I tried an empty
>> <onException>, but that didn't work either:
>>
>> <errorHandler id="camelErrorHandler" logName="mediaTransfer"
>>    type="LoggingErrorHandler" level="WARN"
>> xmlns="http://camel.apache.org/schema/spring">
>> </errorHandler>
>>
>> <camelContext id="camelContext"
>> xmlns="http://camel.apache.org/schema/spring"
>>    errorHandlerRef="camelErrorHandler">
>>    <endpoint id="source" uri="activemq:queue:thing1"/>
>>    <endpoint id="destination" uri="file:/invalid/path"/>
>>    <route>
>>        <from ref="source"/>
>>        <transacted/>
>>        <process ref="aProcessor"/>
>>        <to ref="destination"/>
>>        <onException>
>>            <exception>java.lang.Exception</exception>
>>            <stop/>
>>        </onException>
>>    </route>
>> </camelContext>
>>
>> Is there something I'm missing or does this option just not exist?
>>
>
>


Mime
View raw message