Results 1 to 2 of 2

Thread: Use <gateway> together with <annotation-driven>

  1. #1
    Join Date
    Jun 2008
    Posts
    2

    Default 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. #2
    Join Date
    Jun 2008
    Posts
    2

    Default Re: Use <gateway> together with <annotation-driven>

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

    Regards,
    Tommy Siu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •