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

Claus Ibsen commented on CAMEL-4235:
------------------------------------

The work around is to use <bean> for error handlers, eg
{code:xml}
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";>

  <bean id="dlc" class="org.apache.camel.builder.DeadLetterChannelBuilder">
    <property name="deadLetterUri" value="mock:dead"/>
  </bean>

    <camelContext xmlns="http://camel.apache.org/schema/blueprint";>

        <!--<errorHandler id="dlc" deadLetterUri="mock:dead" 
type="DeadLetterChannel"/>-->

        <route errorHandlerRef="dlc">
            <from uri="direct:start"/>
            <to uri="mock:result"/>
        </route>

    </camelContext>

</blueprint>
{code}

> CamelBlueprint2Test  testErrorHandler test is failed.
> -----------------------------------------------------
>
>                 Key: CAMEL-4235
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4235
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint, osgi
>    Affects Versions: 2.8.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.8.0
>
>
> org.apache.camel.itest.osgi.blueprint.CamelBlueprint2Test.testErrorHandler 
> failed dure to the CircularDependencyException.
> {code}
> [Blueprint Extender: 1] ERROR 
> org.apache.aries.blueprint.container.BlueprintContainerImpl - Unable to start 
> blueprint container for bundle CamelBlueprintTestBundle14
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to 
> intialize bean camel-1
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
>         at 
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
>       at 
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
>       at 
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
> ......
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create 
> route route1 at: >>> To[mock:result] <<< in route: Route[[From[direct:start]] 
> -> [To[mock:result]]] because of 
> org.apache.aries.blueprint.di.CircularDependencyException: 
> [BeanRecipe[name='dlc'], BeanRecipe[name='.camelBlueprint.bean.factory.dlc'], 
> BeanRecipe[name='camel-1'], BeanRecipe[name='dlc']]
>       at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:794)
>       at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:165)
>       at 
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:705)
>       at 
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1659)
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to