Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4760

Unable to set logName on DefaultErrorHandler as well as executorService on LoggingErrorHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.3
    • 2.8.4, 2.9.0
    • camel-spring
    • None
    • Unknown

    Description

      The following snippets do not work, although each of the specified error handlers supports logName and executorServiceRef. The issue is actual for the DeadLetterChannel error handler too.

      LoggingErrorHandler
      <errorHandler id="errorHandler" type="LoggingErrorHandler" logName="${router.logger.name}" executorServiceRef="redeliveryExecutor"/>
      
      DefaultErrorHandler
      <errorHandler id="errorHandler" type="DefaultErrorHandler" logName="${router.logger.name}" executorServiceRef="redeliveryExecutor"/>
      
      StackTrace
      Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/spring/camel-context.xml]; nested exception is java.lang.IllegalArgumentException: Attribute executorServiceRef is not supported by error handler type: LoggingErrorHandler, in error handler with id: errorHandler
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
      	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186)
      	... 42 more
      Caused by: java.lang.IllegalArgumentException: Attribute executorServiceRef is not supported by error handler type: LoggingErrorHandler, in error handler with id: errorHandler
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            szhemzhitsky Sergey Zhemzhitsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: