Announcement Announcement Module
Collapse
No announcement yet.
Failed to determine expected type for parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failed to determine expected type for parameter

    I got abstract generic superclass for processor:
    Code:
    public abstract class AbstractGenericProcessor<E> {
        public Object process(Message<? extends E> message) {
            //some logic here
            processInternal(message);
        }
        
         protected abstract Object processInternal(Message<? extends E> message);
    }
    and it's implementation

    Code:
    public class CommonBusinessProcessor extends AbstractGenericBusinessProcessor<Foo> {
        protected Object processInternal(Message<? extends Foo>) {
            //impl
        }
    
    }
    it causes exception

    Code:
    Caused by: java.lang.IllegalArgumentException: Failed to determine expected type for parameter [org.springframework.integration.core.Message<? extends E>] on Method [public java.lang.Object somepackage.AbstractGenericBusinessProcessor.process(org.springframework.integration.core.Message)]
    	at java.lang.Throwable.<init>(Throwable.java:67)
    	at org.springframework.util.Assert.notNull(Assert.java:111)
    	at org.springframework.integration.handler.PayloadTypeMatchingHandlerMethodResolver.determineExpectedType(PayloadTypeMatchingHandlerMethodResolver.java:111)
    	at org.springframework.integration.handler.PayloadTypeMatchingHandlerMethodResolver.initMethodMap(PayloadTypeMatchingHandlerMethodResolver.java:69)
    	at org.springframework.integration.handler.PayloadTypeMatchingHandlerMethodResolver.<init>(PayloadTypeMatchingHandlerMethodResolver.java:48)
    	at org.springframework.integration.handler.MessageMappingMethodInvoker.createResolverForAnnotation(MessageMappingMethodInvoker.java:250)
    	at org.springframework.integration.handler.MessageMappingMethodInvoker.<init>(MessageMappingMethodInvoker.java:80)
    	at org.springframework.integration.handler.ServiceActivatingHandler.<init>(ServiceActivatingHandler.java:34)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:516)
    	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
    	... 64 more
    My problem looks like http://forum.springsource.org/showthread.php?t=66168

    I'm using SI 1.0.4.
Working...
X