Results 1 to 5 of 5

Thread: Exception with int:interval-trigger namespace

  1. #1

    Default 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. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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

  3. #3

    Default

    Thanks a lot zhurakousky i was not aware of that

  4. #4

    Default

    hi zhurakously ,


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

  5. #5
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    213

    Default

    Quote 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.

Posting Permissions

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