I am getting the following exception
When defining a simple target adapter in xml. The actual definition isCode:Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.endpoint.TargetEndpoint#0': Cannot resolve reference to bean 'test' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.reflect.Method] for property 'method'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [java.lang.reflect.Method] for property 'method': no matching editors or conversion strategy found
The subscriber definition isCode:<target-adapter id="test" ref="subscriber" method="processRequest" />
and the class itself isCode:<beans:bean id="subscriber" class="x.x.x.x.x.demo.OrderSubscriber" />
If I remove the <target-adapter> definition and instead us annotations everythings is fine.Code:public class OrderSubscriber { public OrderSubscriber(){ } public void processRequest(Object o) { System.out.println(o); } }
I am using Spring 2.5.5 and Integration 1.0.0-M4
Is this a bug or am I doing something wrong ?


Reply With Quote