title: how to resolve Dispatcher has no subscribers for channel?
body: <p>my configuration is as below , i am getting no subscriber exception , how can i resolve ?</p>
  
  <pre><code>&lt;bean id="Beani" class="org.util.Beani" init-method="init" /&gt;
  &lt;int:gateway id="configHelper" 
      service-interface="org.ncb.quickpay.grs.util.PartnerConfigReader"
      default-request-timeout="5000" default-reply-timeout="5000"&gt;
      &lt;int:method name="getConfiguration" request-channel="configChannel" /&gt;
  &lt;/int:gateway&gt;
  
  &lt;int-jpa:retrieving-outbound-gateway 
      entity-manager="entityManager" request-channel="configChannel"
      jpa-query="select s from Setting s where  s.settingsCategory.category=:category"&gt;
      &lt;int-jpa:parameter name="category" expression="payload['category']" /&gt;
  &lt;/int-jpa:retrieving-outbound-gateway&gt;
  </code></pre>
  
  <p>i am invoking this in a bean init method </p>
  
  <pre><code>public void init() throws Exception {
      System.out.println(" initialization global MAp  beni ");
      Map msgMap = new HashMap();
      msgMap.put("category", "web_service_dtl");
      Message msg = MessageBuilder.withPayload(msgMap).build();
      List&lt;Setting&gt; configList = configReader.getConfiguration(msg);
  
      if(configList!=null){
      for (Setting config : configList) {
          globalMap.put(config.getSettingsParameter().getParameterName() + "_"
                  + config.getSettingsCategory().getPartnerId(), config.getParamValue());
      }
      }
  
      System.out.println(" map is  "+globalMap);
  
  }
  </code></pre>
  
  <p>bean is defined in xml , and i am getting exception .</p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Beani' defined in class path resource [grs-spring-integration.xml]: Invocation of init method failed; nested exception is org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'org.springframework.context.support.ClassPathXmlApplicationContext@23ab930d.configChannel'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
  at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
  at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
  at org.ncb.quickpay.grs.service.main.StartService.main(StartService.java:18)
  Caused by: org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'org.springframework.context.support.ClassPathXmlApplicationContext@23ab930d.configChannel'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers
      at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:81)
  </code></pre>
  
  <p>Please let me know how to resolve it ?</p>