org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'errorChannel' [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:75) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.resolveErrorChannel(MessagePublishingErrorHandler.java:111) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.handleError(MessagePublishingErrorHandler.java:78)

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I am throwing events on a async publishing channel, if these events fail the below exception is thrown. The problem i think is in the {{org.springframework.integration.channel.MessagePublishingErrorHandler.resolveErrorChannel(Throwable)}} As it tries up to lookup the default 'errorChannel' when it does not exist, when it should use the error channel specified on the message as a priority. I accept a default errorChannel should always be created, but I think this is not always the case in OSGi {code} <int:gateway id="orderExecutionEventPublisher" default-request-channel="orderExecutionEventsEnricher" service-interface="com.investmaster.orders.execution.OrderExecutionEventPublisher" /> <int:channel id="orderExecutionEventsEnricher" /> <int:header-enricher input-channel="orderExecutionEventsEnricher" output-channel="orderExecutionEvents"> <int:error-channel ref="failedExecutionEvents" /> </int:header-enricher> <int:publish-subscribe-channel id="orderExecutionEvents" task-executor="orderExecutionExecutor" /> <task:executor id="orderExecutionExecutor" pool-size="5" /> <!-- Error Handling --> <int:channel id="failedExecutionEvents" /> <int:service-activator input-channel="failedExecutionEvents" ref="orderExecutionEventErrorHandler" method="logEvent" /> <bean id="orderExecutionEventErrorHandler" class="com.investmaster.orders.execution.OrderExecutionEventErrorHandler" /> {code} {noformat} [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err Exception in thread "orderExecutionExecutor-16" org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'errorChannel' [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:75) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.resolveErrorChannel(MessagePublishingErrorHandler.java:111) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.handleError(MessagePublishingErrorHandler.java:78) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at java.lang.Thread.run(Thread.java:662) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'errorChannel' is defined [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277) [2013-04-09 18:07:03.405] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [2013-04-09 18:07:03.405] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:72) [2013-04-09 18:07:03.405] ERROR orderExecutionExecutor-16 System.err ... 6 more {noformat}
    via by Richard Wagstaff,
  • I am throwing events on a async publishing channel, if these events fail the below exception is thrown. The problem i think is in the {{org.springframework.integration.channel.MessagePublishingErrorHandler.resolveErrorChannel(Throwable)}} As it tries up to lookup the default 'errorChannel' when it does not exist, when it should use the error channel specified on the message as a priority. I accept a default errorChannel should always be created, but I think this is not always the case in OSGi {code} <int:gateway id="orderExecutionEventPublisher" default-request-channel="orderExecutionEventsEnricher" service-interface="com.investmaster.orders.execution.OrderExecutionEventPublisher" /> <int:channel id="orderExecutionEventsEnricher" /> <int:header-enricher input-channel="orderExecutionEventsEnricher" output-channel="orderExecutionEvents"> <int:error-channel ref="failedExecutionEvents" /> </int:header-enricher> <int:publish-subscribe-channel id="orderExecutionEvents" task-executor="orderExecutionExecutor" /> <task:executor id="orderExecutionExecutor" pool-size="5" /> <!-- Error Handling --> <int:channel id="failedExecutionEvents" /> <int:service-activator input-channel="failedExecutionEvents" ref="orderExecutionEventErrorHandler" method="logEvent" /> <bean id="orderExecutionEventErrorHandler" class="com.investmaster.orders.execution.OrderExecutionEventErrorHandler" /> {code} {noformat} [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err Exception in thread "orderExecutionExecutor-16" org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'errorChannel' [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:75) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.resolveErrorChannel(MessagePublishingErrorHandler.java:111) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.handleError(MessagePublishingErrorHandler.java:78) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at java.lang.Thread.run(Thread.java:662) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'errorChannel' is defined [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095) [2013-04-09 18:07:03.404] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277) [2013-04-09 18:07:03.405] ERROR orderExecutionExecutor-16 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [2013-04-09 18:07:03.405] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:72) [2013-04-09 18:07:03.405] ERROR orderExecutionExecutor-16 System.err ... 6 more {noformat}
    via by Richard Wagstaff,
    • org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'errorChannel' [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:75) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.resolveErrorChannel(MessagePublishingErrorHandler.java:111) [2013-04-09 18:07:03.403] ERROR orderExecutionExecutor-16 System.err at org.springframework.integration.channel.MessagePublishingErrorHandler.handleError(MessagePublishingErrorHandler.java:78) at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'errorChannel' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)

    Users with the same issue

    Unknown visitor1 times, last one,
    Victor_IT
    Victor_IT1 times, last one,
    tvrmsmith
    tvrmsmith2 times, last one,
    bernardpaulus
    bernardpaulus27 times, last one,
    odd
    odd42 times, last one,
    93 more bugmates