[ 
https://issues.apache.org/jira/browse/CAMEL-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166227#comment-13166227
 ] 

Claus Ibsen commented on CAMEL-4760:
------------------------------------

The logging error handler is suppose to be a simple logger. The 
LoggingErrorHandlerBuilder does not offer any DSL for setting redelivery etc.
So you can only set the logName and log level on the loggingErrorHandler() in 
the DSL.

What you do is to configure redelivery settings using onException which 
supports that.
                
> Unable to set logName on DefaultErrorHandler as well as executorService on 
> LoggingErrorHandler
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4760
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4760
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>    Affects Versions: 2.8.3
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.4, 2.9.0
>
>
> 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.
> {code:title=LoggingErrorHandler}
> <errorHandler id="errorHandler" type="LoggingErrorHandler" 
> logName="${router.logger.name}" executorServiceRef="redeliveryExecutor"/>
> {code}
> {code:title=DefaultErrorHandler}
> <errorHandler id="errorHandler" type="DefaultErrorHandler" 
> logName="${router.logger.name}" executorServiceRef="redeliveryExecutor"/>
> {code}
> {code:title=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
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to