Announcement Announcement Module
Collapse
No announcement yet.
Exception with int:interval-trigger namespace Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception with int:interval-trigger namespace

    hi Everyone,


    I was trying to use int:interval-trigger in the inbound and outbound adapters this is the xml file

    <?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:context="http://www.springframework.org/schema/context"
    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/schem...ntegration.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd">


    <context:component-scan base-package="ticketproject"/>

    <int:channel id="ticketChannel">
    <int:queue capacity="50"/>
    </int:channel>

    <int:inbound-channel-adapter channel="ticketChannel" ref="problemReporter" method="openTickets">
    <intoller>
    <int:interval-trigger interval="500"/>
    </intoller>
    </int:inbound-channel-adapter>

    <int:outbound-channel-adapter channel="ticketChannel" ref="ticketMessageHandler" method="handleMessage">
    <intoller>
    <int:interval-trigger interval="1000"/>
    </intoller>
    </int:outbound-channel-adapter>

    </beans>

    but i am getting the below error can anyone please help (I have also attached the configuration xml file )

    Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 22 in XML document from class path resource [adapter.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'int:interval-trigger'. One of '{"http://www.springframework.org/schema/integration":transactional, "http://www.springframework.org/schema/integration":advice-chain}' is expected.
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:396)
    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:174)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:209)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:180)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:243)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:127)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:93)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:131)
    at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:522)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:436)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)

  • #2
    What version of SI you are using?
    This element was long removed after 2.0 was released. See the migration guide:
    http://www.springsource.org/node/2976

    Comment


    • #3
      Thanks a lot zhurakousky i was not aware of that

      Comment


      • #4
        hi zhurakously ,


        Cant we use the inbound and outbound adapters without polling coz when i try that i gives an error

        Comment


        • #5
          Originally posted by adarshgp.nie View Post
          hi zhurakously ,


          Cant we use the inbound and outbound adapters without polling coz when i try that i gives an error
          You need a poller for inbound-channel-adapter and for outbound-channel-adapter if the channel is a PollableChannel.

          The sub element int:internal-trigger is no more supported and hence you are getting this expection.

          You need to use one of the trigger,fixed-rate,fixed-delay,cron (with an additional time-unit attribute may be specified with fixed-delay and fixed-rate attributes only)attributes to the poller element.

          Comment

          Working...
          X