Results 1 to 5 of 5

Thread: How to do the trigger configuration for poller

  1. #1
    Join Date
    Sep 2011
    Posts
    167

    Default How to do the trigger configuration for poller

    Hi ,

    I have implemented the poller as a global tag....on the top in my configuration file but upon executing it is showing me an error that a trigger configuration is required ,i am sending u the complete stack trace of that....


    org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: A <poller> must have a one and only one trigger configuration.
    Offending resource: class path resource [jms-spring-context.xml]
    at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
    at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:72)
    at org.springframework.integration.config.xml.PollerP arser.configureTrigger(PollerParser.java:178)
    at org.springframework.integration.config.xml.PollerP arser.parseInternal(PollerParser.java:91)
    at org.springframework.beans.factory.xml.AbstractBean DefinitionParser.parse(AbstractBeanDefinitionParse r.java:59)
    at org.springframework.beans.factory.xml.NamespaceHan dlerSupport.parse(NamespaceHandlerSupport.java:73)
    at org.springframework.integration.config.xml.Abstrac tIntegrationNamespaceHandler.parse(AbstractIntegra tionNamespaceHandler.java:53)
    at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1338)
    at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1328)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:135)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:93)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:126)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:92)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:130)
    at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:467)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:397)
    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)


    please provide me how to do the trigger configuration for poller...??

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,036

    Default

    When asking questions like these, please always provide your config - in this case, the poller.

    You need one of fixed-rate, fixed-delay, cron or trigger; please read the reference manual.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3
    Join Date
    Sep 2011
    Posts
    167

    Default

    Hi,

    I am providing u with my xml configuration file just check it....

    <?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"
    xmlns:jms="http://www.springframework.org/schema/integration/jms"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/jms http://www.springframework.org/schem...ng-jms-3.0.xsd
    http://www.springframework.org/schema/integration http://www.springframework.org/schem...ration-2.0.xsd
    http://www.springframework.org/schema/integration/jms http://www.springframework.org/schem...on-jms-2.0.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">




    <context:component-scan base-package="com.apress.prospringintegration" />


    <intoller id="poller" default="true" >
    <int:interval-trigger interval="500"/>
    </intoller>






    <int:channel id="output" >

    </int:channel>



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

    <jms:outbound-channel-adapter channel="input" destination-name="requestQueueamit21" />

    <jms:message-driven-channel-adapter channel="output" destination-name="requestQueueamit21" />

    <!-- <jms:inbound-channel-adapter channel="output" destination-name="requestQueueamit" /> -->



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

    </int:header-value-router>


    <int:channel id="inventory" >
    <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:service-activator input-channel="input"

    output-channel="output"

    ref="shouter"

    method="shout"/>
    -->


    <bean id="shouter" class="com.apress.prospringintegration.Shouter"/>

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



    ref="shouter"

    method="shout"/> -->









    </beans>

  4. #4
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Once again, please read http://static.springsource.org/sprin...ce/htmlsingle/. There are tons of samples of trigger configurations.

    Also, what version of Spring Integration you are using?

  5. #5
    Join Date
    Sep 2011
    Posts
    167

    Default problem solved

    Hi,

    I am using spring integration version 2, but anyways the problm is solved , I really thankful 2 u for u r help and support, thanx a lot..!!

Posting Permissions

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