Announcement Announcement Module
Collapse
No announcement yet.
Use <gateway> together with <annotation-driven> Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use <gateway> together with <annotation-driven>

    Hi,

    I tried to use both <gateway> and <annotation-driven> element in my config xml, but it keeps giving me the following error:

    Code:
    Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fooService': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: Class must not be null
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:142)
    	at java.security.AccessController.doPrivileged(AccessController.java:215)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1285)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
    	at testing.Demo.main(Demo.java:39)
    Caused by: java.lang.IllegalArgumentException: Class must not be null
    	at org.springframework.util.Assert.notNull(Assert.java:112)
    	at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:122)
    	at org.springframework.integration.config.MessageEndpointAnnotationPostProcessor.postProcessAfterInitialization(MessageEndpointAnnotationPostProcessor.java:111)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1427)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:139)
    	... 9 more
    Here is my config xml:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans .....>
    	<message-bus />
    	<annotation-driven />
    
    	<channel id="input" />
    	<channel id="output" />
    
    	<gateway id="fooService" service-interface="testing.FooService"
    		request-channel="input" reply-channel="output" />
    	<handler-endpoint input-channel="input" output-channel="output"
    		handler="myHandler" />
    
    	<beans:bean id="myHandler" class="testing.MyHandler" />
    </beans:beans>
    I found that if I remove the <annotation-driven> element, everything would be fine. Is it a bug or my config problem ?

    Many Thanks,
    Tommy Siu

  • #2
    Re: Use &lt;gateway&gt; together with &lt;annotation-driven&gt;

    Sorry, please ignore my question.
    It should have been resolved in M5 as INT-239.

    Regards,
    Tommy Siu

    Comment

    Working...
    X