Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.4.4
-
None
-
Unknown
Description
Whenever refreshing a bundle that creates a camel context via blueprint, the warning below appears in the logs:
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]
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
To reproduce:
- Create a bundle with this blueprint.xml
<?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>
- Install in Karaf
- Refresh the bundle
Attachments
Issue Links
- is caused by
-
CAMEL-14332 camel-blueprint - Camel route does not consider the value of ShutdownStrategy timeout.
- Resolved