Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15760

org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'blueprintBundle' could be found

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.4
    • 3.4.5, 3.7.0
    • camel-blueprint
    • 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:

      1. 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>
      
      1. Install in Karaf
      2. Refresh the bundle

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              joshua.smith Josh Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: