Announcement Announcement Module
Collapse
No announcement yet.
Problem with handlng ApplicationEvent Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with handlng ApplicationEvent

    Hi all
    i am trying to involve ApplicationEvent in my spring integ application.
    here's my app context
    Code:
    <?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:context="http://www.springframework.org/schema/context"
           xmlns:si="http://www.springframework.org/schema/integration"
           xmlns:int-event="http://www.springframework.org/schema/integration/event"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/integration
           http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
           http://www.springframework.org/schema/integration/event
           http://www.springframework.org/schema/integration/event/spring-integration-event-2.0.xsd">
    
       
        <!-- Spring INtegration Event Handler -->
        <int-event:inbound-channel-adapter channel="eventChannel"
                                          event-types="com.sample.domain.ErrorEvent"/>
    
        <si:publish-subscribe-channel id="eventChannel"/>
    
        
        <bean id="testErrorHandler" class="com.sample.handlers.TestErrorHandlerImpl"/>
    
        <si:chain input-channel="eventChannel">
            <si:delayer default-delay="1200" />
            <si:service-activator ref="testErrorHandler" method="handleError" />
        </si:chain>
    
    
    </beans>
    but i am getting this exception
    Code:
    Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 193 in XML document from class path resource [si-shares-pipeline.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'event-types' is not allowed to appear in element 'int-event:inbound-channel-adapter'.
    could anyone assist?

    w/kindest regards
    marco

  • #2
    Are you sure you have a spring-integration-event 2.0.x JAR on your classpath? (and not a 1.0.x version)

    Comment


    • #3
      Hi Mark
      thanks for reply. I was actually using spring 2.0.0.M5.
      once moved to spring integ 2.0.x and spring 3.0.x I got it sorted.
      thanks for help
      regards
      marco

      Comment

      Working...
      X