Results 1 to 4 of 4

Thread: GatewayProxyFactoryBean Error in Deployment

  1. #1
    Join Date
    Aug 2007
    Posts
    138

    Default GatewayProxyFactoryBean Error in Deployment

    I am using SI's GatewayProxyFactoryBean to implement an interface I call CustomerSearchGateway. It is configured as follows:

    Code:
    <gateway id="customerSearchGateway"
                 service-interface="enterprise.interfaces.search.CustomerSearchGateway"
                 default-request-channel="customerSearchRequestChannel"
                 default-reply-channel="customerSearchResponseChannel"/>
    where the two channels are defined as well in the context configuration file.

    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:

    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'
    However, when I make precisely the same call in my web application that I make in my test, I get this exception:

    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)
    Any insight into why this exception is occurring is much appreciated.

    Thanks.

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    Do you have any other endpoints that are subscribed to 'customerSearchRequestChannel' (have that as the 'input-channel' value)?

  3. #3
    Join Date
    Aug 2007
    Posts
    138

    Default

    No, I don't. I do have other channels configured in my file, but the customerSearchRequestChannel is the input channel only for the CustomerSearchGateway.

    I remain perplexed, so any other ideas are appreciated. One thing I might check is the possibility of some kind of JAR file collision--where the classpath for my TestNG test is pure but that something about the packaging in my WAR file causes this issue. It is the only difference I can think of between the two at this point.

    Thanks.

  4. #4
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    From the stack I can see that there is some seam magic going on, so there is definitely a difference. I'd look to see if it was reproducible on tomcat (i.e. getting seam out of the equation). Of course you can also look at the classpath too spot other differences.

Posting Permissions

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