Announcement Announcement Module
Collapse
No announcement yet.
Exception-type-router configuration error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception-type-router configuration error

    I'm getting the following error at start-up when trying to use the Exception-type-router.

    Configuration problem: Cannot locate BeanDefinitionParser for element [exception-type-router]

    Here is the configuration file

    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:int="http://www.springframework.org/schema/integration"
    	xmlns:task="http://www.springframework.org/schema/task" xmlns:jdbc="http://www.springframework.org/schema/integration/jdbc" xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
    	xsi:schemaLocation="http://www.springframework.org/schema/integration 
    				     http://www.springframework.org/schema/integration/spring-integration-2.1.xsd
    				     http://www.springframework.org/schema/integration/jms 
    				     http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
    				     http://www.springframework.org/schema/task 
    				     http://www.springframework.org/schema/task/spring-task-3.0.xsd
    				     http://www.springframework.org/schema/beans 
    				     http://www.springframework.org/schema/beans/spring-beans.xsd 
    				     http://www.springframework.org/schema/integration/jdbc
    				     http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd">
    
    	<int:exception-type-router input-channel="errorChannel"
    		default-output-channel="failedChannel">
    		<int:mapping exception-type="java.lang.IllegalArgumentException"
    			channel="delayChannel" />
    	</int:exception-type-router>
     		
            <int:channel id="delayChannel"/>
            <int:channel id="failedChannel"/>
      </beans>
    What did I miss?

  • #2
    Namespace support for exception-type-router was introduced in 2.0.4.

    Is it possible you have an older Spring Integration version on your runtime classpath?

    Comment


    • #3
      I'm running 2.1.3. Is there logging that I can enable to confirm the version?

      Comment


      • #4
        Another possibility is that you can have multiple versions of SI on the classpath. Are you using Maven/Gradle for dependency management or something else?

        Comment


        • #5
          You can run the JVM with
          Code:
          -verbose
          and grep the output to find which jar the IntegrationNamespaceHandler is loaded from.

          Comment


          • #6
            I'm using ivy and a dependency was still using 2.0.3. I've made the change and it is now working. Thanks for the help.

            Comment

            Working...
            X