Hi all,

I'm running Camel 2.10.4 in Karaf 2.3.1 and get NoSuchComponentException
during the shutdown process.

My blueprint configuration file declares a bean which is a Camel Processor

<bean id="myBean" class="org.example.MyBean" />

The CamelContext contains a route that aggregates incoming messages and
which forces a completion on stop.

<route>
  <from uri="direct:aggregate" />
  <aggregate strategyRef="aggregationStrategy"
      forceCompletionOnStop="true" ...>
    ...
    <to uri="direct:onCompletion" />
  </aggregate>
</route>

The second route contains the bean invocation

<route>
  <from uri="direct:onCompletion" />
  ...
  <bean ref="myBean" />
  ...
</route>

During shutdown the bean invocation in the second route fails

org.apache.camel.RuntimeCamelException: 
org.osgi.service.blueprint.container.NoSuchComponentException: No component 
with id 
'myBean' could be found
        at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1316)
        at 
org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:51)
        at 
org.apache.camel.component.bean.RegistryBean.lookupBean(RegistryBean.java:136)
        at 
org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:62)
        at 
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:77)
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        ...
Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No 
component with id 'myBean' could be found
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:742)
        at 
org.apache.camel.blueprint.BlueprintContainerRegistry.lookup(BlueprintContainerRegistry.java:41)
        at 
org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:68)
        at 
org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:49)

I tried to add a 'depends-on' property on the CamelContext declaration but
this seems not to help.

It looks like that the Blueprint Container is no longer available.

Any suggestions?

Regards,
Tobias Hofer





Reply via email to