I am using SI's GatewayProxyFactoryBean to implement an interface I call CustomerSearchGateway. It is configured as follows:
where the two channels are defined as well in the context configuration file.Code:<gateway id="customerSearchGateway" service-interface="enterprise.interfaces.search.CustomerSearchGateway" default-request-channel="customerSearchRequestChannel" default-reply-channel="customerSearchResponseChannel"/>
I test this CustomerSearchGateway in a TestNG test where I bootstrap the application context, and the tests pass.
Then, I package the interface along with the configuration file and everything else in a JAR file which is itself packaged in a WAR file. Everything in the logs appears fine:
However, when I make precisely the same call in my web application that I make in my test, I get this exception:Code:19 Mar 2009 16:30:26,298: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.getSingleton - Creating shared instance of singleton bean 'customerSearchRequestChannel' 19 Mar 2009 16:30:26,298: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.run - Creating instance of bean 'customerSearchRequestChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doCreateBean - Eagerly caching bean 'customerSearchRequestChannel' to allow for resolving potential circular references 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.run - Finished creating instance of bean 'customerSearchRequestChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.getSingleton - Creating shared instance of singleton bean 'customerSearchResponseChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.run - Creating instance of bean 'customerSearchResponseChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doCreateBean - Eagerly caching bean 'customerSearchResponseChannel' to allow for resolving potential circular references 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.run - Finished creating instance of bean 'customerSearchResponseChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.getSingleton - Creating shared instance of singleton bean 'customerSearchGateway' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.run - Creating instance of bean 'customerSearchGateway' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doCreateBean - Eagerly caching bean 'customerSearchGateway' to allow for resolving potential circular references 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.TypeConverterDelegate.doConvertValue - Converting String to [class java.lang.Class] using property editor [org.springframework.beans.propertyeditors.ClassEditor@12d1794] 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean - Returning cached instance of singleton bean 'customerSearchRequestChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean - Returning cached instance of singleton bean 'customerSearchResponseChannel' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean - Returning cached instance of singleton bean 'taskScheduler' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.invokeInitMethods - Invoking afterPropertiesSet() on bean with name 'customerSearchGateway' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.core.CollectionFactory.createConcurrentMapIfPossible - Creating [java.util.concurrent.ConcurrentHashMap] 19 Mar 2009 16:30:26,308: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean - Returning cached instance of singleton bean 'taskScheduler' 19 Mar 2009 16:30:26,308: DEBUG org.springframework.core.CollectionFactory.createConcurrentMapIfPossible - Creating [java.util.concurrent.ConcurrentHashMap] 19 Mar 2009 16:30:26,308: DEBUG org.springframework.aop.framework.JdkDynamicAopProxy.getProxy - Creating JDK dynamic proxy: target source is EmptyTargetSource: no target class, static 19 Mar 2009 16:30:26,318: INFO org.springframework.integration.gateway.SimpleMessagingGateway.start - started org.springframework.integration.gateway.SimpleMessagingGateway@12e3572 19 Mar 2009 16:30:26,318: INFO org.springframework.integration.gateway.GatewayProxyFactoryBean.start - started customerSearchGateway 19 Mar 2009 16:30:26,318: DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory.run - Finished creating instance of bean 'customerSearchGateway'
Any insight into why this exception is occurring is much appreciated.Code:org.springframework.integration.message.MessageDeliveryException: Dispatcher has no subscribers. at org.springframework.integration.dispatcher.SimpleDispatcher.dispatch(SimpleDispatcher.java:39) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:56) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94) at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:222) at org.springframework.integration.channel.MessageChannelTemplate.doSendAndReceive(MessageChannelTemplate.java:247) at org.springframework.integration.channel.MessageChannelTemplate.sendAndReceive(MessageChannelTemplate.java:214) at org.springframework.integration.gateway.AbstractMessagingGateway.sendAndReceiveMessage(AbstractMessagingGateway.java:168) at org.springframework.integration.gateway.AbstractMessagingGateway.sendAndReceive(AbstractMessagingGateway.java:151) at org.springframework.integration.gateway.AbstractMessagingGateway.sendAndReceive(AbstractMessagingGateway.java:142) at org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:203) at org.springframework.integration.gateway.GatewayProxyFactoryBean.invoke(GatewayProxyFactoryBean.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy369.findCustomers(Lenterprise.interfaces.cdb.search.Parameters;)Lenterprise.interfaces.cdb.search.Results;(Unknown Source) at persistence.search.CustomerAdvancedSearch.getSearchResultsForPage(CustomerAdvancedSearch.java:187) at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) at org.jboss.seam.util.Reflections.invoke(Reflections.java:21) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
Thanks.


Reply With Quote