Announcement Announcement Module
Collapse
No announcement yet.
TypeMismatchException when defining <target-adapter> Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TypeMismatchException when defining <target-adapter>

    I am getting the following exception
    Code:
    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
    When defining a simple target adapter in xml. The actual definition is
    Code:
    	<target-adapter id="test" ref="subscriber" method="processRequest" />
    The subscriber definition is
    Code:
    	<beans:bean id="subscriber" class="x.x.x.x.x.demo.OrderSubscriber" />
    and the class itself is
    Code:
    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 ?

  • #2
    I created JIRA issue INT-272. This is now fixed in svn.


    Jonas Partner
    Senior Consultant
    SpringSource

    Comment

    Working...
    X