Results 1 to 6 of 6

Thread: Exception-type-router configuration error

  1. #1
    Join Date
    Mar 2011
    Posts
    22

    Default 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. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,038

    Default

    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?
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3
    Join Date
    Mar 2011
    Posts
    22

    Default

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

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

    Default

    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?

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

    Default

    You can run the JVM with
    Code:
    -verbose
    and grep the output to find which jar the IntegrationNamespaceHandler is loaded from.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  6. #6
    Join Date
    Mar 2011
    Posts
    22

    Default

    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.

Posting Permissions

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