[
https://issues.apache.org/jira/browse/CAMEL-15760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen reassigned CAMEL-15760:
-----------------------------------
Assignee: (was: Grzegorz Grzybek)
> org.osgi.service.blueprint.container.NoSuchComponentException: No component
> with id 'blueprintBundle' could be found
> --------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-15760
> URL: https://issues.apache.org/jira/browse/CAMEL-15760
> Project: Camel
> Issue Type: Bug
> Components: camel-blueprint
> Affects Versions: 3.4.4
> Reporter: Josh Smith
> Priority: Minor
>
> Whenever refreshing a bundle that creates a camel context via blueprint, the
> warning below appears in the logs:
> {code:java}
> 16:11:44.779 WARN [Blueprint Event Dispatcher: 1] Error occurred while
> stopping lifecycle strategies. This exception will be ignored.
> org.osgi.service.blueprint.container.NoSuchComponentException: No component
> with id 'blueprintBundle' could be found
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:805)
> ~[?:?]
> at
> org.apache.camel.blueprint.BlueprintContainerBeanRepository.lookupByType(BlueprintContainerBeanRepository.java:104)
> ~[?:?]
> at
> org.apache.camel.blueprint.BlueprintContainerBeanRepository.lookupByType(BlueprintContainerBeanRepository.java:100)
> ~[?:?]
> at
> org.apache.camel.blueprint.BlueprintContainerBeanRepository.findByType(BlueprintContainerBeanRepository.java:94)
> ~[?:?]
> at
> org.apache.camel.support.DefaultRegistry.findByType(DefaultRegistry.java:203)
> ~[!/:3.4.4]
> at
> org.apache.camel.impl.engine.OnCamelContextLifecycleStrategy.onContextStop(OnCamelContextLifecycleStrategy.java:60)
> ~[!/:3.4.4]
> at
> org.apache.camel.impl.engine.AbstractCamelContext.doStop(AbstractCamelContext.java:2910)
> [!/:3.4.4]
> at org.apache.camel.support.service.BaseService.stop(BaseService.java:155)
> [!/:3.4.4]
> at
> org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:194)
> [!/:3.4.4]
> at
> org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:190)
> [!/:1.10.2]
> at
> org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:188)
> [!/:1.10.2]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_242]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [?:1.8.0_242]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_242]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [?:1.8.0_242]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_242]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> [?:1.8.0_242]
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> [?:1.8.0_242]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [?:1.8.0_242]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [?:1.8.0_242]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]{code}
> It appears that the Blueprint container is being destroyed before the camel
> context, but the camel context tries to access the bundle when stopping. And
> since the blueprint container is already destroyed, that fails.
> Reverting this change fixes the warnings:
> https://issues.apache.org/jira/browse/CAMEL-14332
> Note: Everything appears to work fine when the bundle is started. Still, the
> warnings are concerning
> h3. To reproduce:
> # Create a bundle with this blueprint.xml
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> <camelContext xmlns="http://camel.apache.org/schema/blueprint"
> id="camelContext"/>
> </blueprint>
> {code}
> # Install in Karaf
> # Refresh the bundle
--
This message was sent by Atlassian Jira
(v8.3.4#803005)