locklema
Jul 2nd, 2008, 06:18 AM
I am getting the following exception
Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.endpoint.TargetEn dpoint#0': Cannot resolve reference to bean 'test' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: 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
When defining a simple target adapter in xml. The actual definition is
<target-adapter id="test" ref="subscriber" method="processRequest" />
The subscriber definition is
<beans:bean id="subscriber" class="x.x.x.x.x.demo.OrderSubscriber" />
and the class itself is
public class OrderSubscriber {
public OrderSubscriber(){
}
public void processRequest(Object o) {
System.out.println(o);
}
}
If I remove the <target-adapter> definition and instead us annotations everythings is fine.
I am using Spring 2.5.5 and Integration 1.0.0-M4
Is this a bug or am I doing something wrong ?
Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.endpoint.TargetEn dpoint#0': Cannot resolve reference to bean 'test' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: 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
When defining a simple target adapter in xml. The actual definition is
<target-adapter id="test" ref="subscriber" method="processRequest" />
The subscriber definition is
<beans:bean id="subscriber" class="x.x.x.x.x.demo.OrderSubscriber" />
and the class itself is
public class OrderSubscriber {
public OrderSubscriber(){
}
public void processRequest(Object o) {
System.out.println(o);
}
}
If I remove the <target-adapter> definition and instead us annotations everythings is fine.
I am using Spring 2.5.5 and Integration 1.0.0-M4
Is this a bug or am I doing something wrong ?