Hello
I have the follow
I have checked my books, Spring Integration Reference documentation and my int:service-activatorCode:<import resource="classpath:/activemq-configuration.xml" /> <context:component-scan base-package="com.manuel.jordan.integration" /> <int:channel id="recepcion" /> <int-jms:message-driven-channel-adapter id="jmsEntrada" channel="recepcion" connection-factory="connectionFactory" destination-name="ordenpedido-usa" /> <int:service-activator id="recepcionActivator" ref="recepcionActivator" method="recepcionHandler" input-channel="recepcion" />
is fine
The Java class is not complex
But when I execute my Main class I always get this errorCode:package com.manuel.jordan.integration; import org.springframework.stereotype.Component; import org.springframework.integration.Message; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author Ing Manuel Jordan Elera (dr_pompeii) * @version 1.0 * @since 12/10/2012 * */ @Component public class RecepcionActivator { private static final Logger logger = LoggerFactory.getLogger(RecepcionActivator.class); public void recepcionHandler(Message<?> message){ logger.info("recepcionHandler Message: {}", message.getPayload()); } }
What is wrong? I have such attributeCode:Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recepcionActivator': Cannot resolve reference to bean 'org.springframework.integration.config.ServiceActivatorFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.ServiceActivatorFactoryBean#0': Cannot resolve reference to bean 'recepcionActivator' while setting bean property 'targetObject'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recepcionActivator': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: one of inputChannelName or inputChannel is required at
I am working withCode:<int:service-activator id="recepcionActivator" ref="recepcionActivator" method="recepcionHandler" input-channel="recepcion" />
STS 3.0.0
Spring Framework 3.1.2.RELEASE
Spring Integration 2.1.3.RELEASE
Thanks in advancedCode:<dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-core</artifactId> <version>${spring.integration.version}</version> </dependency> <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-jms</artifactId> <version>${spring.integration.version}</version> </dependency>


Reply With Quote