Announcement Announcement Module
Collapse
No announcement yet.
getting poller exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getting poller exception

    Hi,

    I am using header type router in my application, but on finally executing the application i am getting the error that...


    log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlA pplicationContext).
    log4j:WARN Please initialize the log4j system properly.
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No poller has been defined for endpoint 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1', and no default poller is available within the context.
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 93)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:290 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:192)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:567)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
    at com.apress.prospringintegration.test.main(test.jav a:38)
    Caused by: java.lang.IllegalArgumentException: No poller has been defined for endpoint 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1', and no default poller is available within the context.
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at org.springframework.integration.config.ConsumerEnd pointFactoryBean.initializeEndpoint(ConsumerEndpoi ntFactoryBean.java:180)
    at org.springframework.integration.config.ConsumerEnd pointFactoryBean.afterPropertiesSet(ConsumerEndpoi ntFactoryBean.java:135)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
    ... 12 more



    can u please let me know where I am wrong..?

  • #2
    The input channel of your router is a QueueChannel and that is why you need poller configuration on your router. If you want a direct handoff, than remove the 'queue' subelement from your channel so it will become a DirectChannel.

    Comment


    • #3
      Still the problem is not solved...!!!

      Hi,

      My coding of input channel is (that is named as output)

      <int:channel id="output" >
      <int:queue capacity="10"/>
      </int:channel>

      Now as u can see there is no queue sub element in my output named channel and also tell me how to make it as a DirectChannel. ..?

      Comment


      • #4
        This is the queue sub-element...

        Code:
        <int:queue capacity="10"/>
        Remove it to make it direct, or add a <poller default="true".../> element to poll for messages in the queue.

        Comment


        • #5
          hi,

          I have done that and thanks a lot, but after doing that i am still stuck up with this any error

          org.springframework.integration.MessageDeliveryExc eption: Dispatcher has no subscribers.
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :104)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 7)
          at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:61)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:157)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:128)
          at org.springframework.integration.core.MessagingTemp late.doSend(MessagingTemplate.java:288)
          at org.springframework.integration.core.MessagingTemp late.send(MessagingTemplate.java:149)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.sendMessage(AbstractRep lyProducingMessageHandler.java:176)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.sendReplyMessage(Abstra ctReplyProducingMessageHandler.java:160)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.produceReply(AbstractRe plyProducingMessageHandler.java:125)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleResult(AbstractRe plyProducingMessageHandler.java:119)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleMessageInternal(A bstractReplyProducingMessageHandler.java:101)
          at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:78)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :110)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 7)
          at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:61)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:157)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:128)
          at org.springframework.integration.core.MessagingTemp late.doSend(MessagingTemplate.java:288)
          at org.springframework.integration.core.MessagingTemp late.send(MessagingTemplate.java:149)
          at org.springframework.integration.router.AbstractMes sageRouter.handleMessageInternal(AbstractMessageRo uter.java:220)
          at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:78)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :110)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 7)
          at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:61)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:157)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:128)
          at org.springframework.integration.core.MessagingTemp late.doSend(MessagingTemplate.java:288)
          at org.springframework.integration.core.MessagingTemp late.send(MessagingTemplate.java:149)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.sendMessage(AbstractRep lyProducingMessageHandler.java:176)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.sendReplyMessage(Abstra ctReplyProducingMessageHandler.java:160)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.produceReply(AbstractRe plyProducingMessageHandler.java:125)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleResult(AbstractRe plyProducingMessageHandler.java:119)
          at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleMessageInternal(A bstractReplyProducingMessageHandler.java:101)
          at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:78)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :110)
          at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 7)
          at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:61)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:157)
          at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:128)
          at com.apress.prospringintegration.test.main(test.jav a:56)


          Any idea what is going rite now..?

          Comment


          • #6
            That means there is no element consuming the output channel.

            You need to provide us with more of your configuration.

            Comment


            • #7
              Hi,

              but i have attached the header type router to the output channel, in other words whatever the outcome of the outer channel will be further consumed by the header type route and it will fillter on the bais of the incoming headers ...I am sending u the xml code generated by STS.....


              <?xml version="1.0" encoding="UTF-8"?>
              <beans xmlns="http://www.springframework.org/schema/beans"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:int="http://www.springframework.org/schema/integration"
              xsi:schemaLocation="http://www.springframework.org/schema/beans
              http://www.springframework.org/schem...ring-beans.xsd
              http://www.springframework.org/schema/integration
              http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">


              <!-- <context:annotation-config/>
              <context:component-scan base-package="com.apress.prospringintegration" />
              <int:channel id="input" />
              <jms:outbound-channel-adapter channel="input" destination-name="requestQueue" /> -->
              <!-- <jms:message-driven-channel-adapter channel="output" destination-name="requestQueue" /> -->
              <!-- <int:channel id="output">
              <int:queue capacity="10" />

              </int:channel>
              <int:service-activator input-channel="input" output-channel="output" ref="sh" method="handleMessage" />
              <bean id="sh" class="com.apress.prospringintegration.MessageHand ler"/>

              -->
              <int:channel id="input"/>
              <int:channel id="output" >
              </int:channel>

              <int:service-activator input-channel="input"

              output-channel="output"

              ref="shouter"

              method="shout"/>



              <bean id="shouter" class="com.apress.prospringintegration.Shouter"/>
              <bean id="invact" class="com.apress.prospringintegration.Inventoryac tivator"/>
              <bean id="priact" class="com.apress.prospringintegration.Priceactiva tor"/>






              <int:header-value-router input-channel="output" header-name="type" ignore-channel-name-resolution-failures="true" >
              <int:mapping value="inventory" channel="inventory"/>
              <int:mapping value="price" channel="price" />
              </int:header-value-router>






              <int:channel id="inventory"></int:channel>
              <int:channel id="price"></int:channel>





              </beans>

              Have a look at it...and plz let me know where I went wrong....!!!

              Comment


              • #8
                Originally posted by SARAL SAXENA View Post
                Hi,

                but i have attached the header type router to the output channel, in other words whatever the outcome of the outer channel will be further consumed by the header type route and it will fillter on the bais of the incoming headers ...I am sending u the xml code generated by STS.....


                <?xml version="1.0" encoding="UTF-8"?>
                <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:int="http://www.springframework.org/schema/integration"
                xsi:schemaLocation="http://www.springframework.org/schema/beans
                http://www.springframework.org/schem...ring-beans.xsd
                http://www.springframework.org/schema/integration
                http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">


                <!-- <context:annotation-config/>
                <context:component-scan base-package="com.apress.prospringintegration" />
                <int:channel id="input" />
                <jms:outbound-channel-adapter channel="input" destination-name="requestQueue" /> -->
                <!-- <jms:message-driven-channel-adapter channel="output" destination-name="requestQueue" /> -->
                <!-- <int:channel id="output">
                <int:queue capacity="10" />

                </int:channel>
                <int:service-activator input-channel="input" output-channel="output" ref="sh" method="handleMessage" />
                <bean id="sh" class="com.apress.prospringintegration.MessageHand ler"/>

                -->
                <int:channel id="input"/>
                <int:channel id="output" >
                </int:channel>

                <int:service-activator input-channel="input"

                output-channel="output"

                ref="shouter"

                method="shout"/>



                <bean id="shouter" class="com.apress.prospringintegration.Shouter"/>
                <bean id="invact" class="com.apress.prospringintegration.Inventoryac tivator"/>
                <bean id="priact" class="com.apress.prospringintegration.Priceactiva tor"/>






                <int:header-value-router input-channel="output" header-name="type" ignore-channel-name-resolution-failures="true" >
                <int:mapping value="inventory" channel="inventory"/>
                <int:mapping value="price" channel="price" />
                </int:header-value-router>






                <int:channel id="inventory"></int:channel>
                <int:channel id="price"></int:channel>





                </beans>

                Have a look at it...and plz let me know where I went wrong....!!!


                Any idea of this prblm...?

                Comment


                • #9
                  Please do not repeat your own post here.

                  If this is the full configuration, it looks like you have no subscribers on either the 'inventory' or 'price' channels.

                  Comment


                  • #10
                    How to make subscribers for these two channels then...?

                    Comment

                    Working...
                    X