Hi,
I started to experiment with blueprint with the current trunk SMX4.
I wrote a blueprint version of the cxf-osgi example which is included
in SMX4’s examples folder.
It is working fine except at one point when the depending component is
restarted, instead of this bundle going into state Created from
GracePeriod, it is going into state Failure.

I am not sure if this is a known limitation at the moment or if there
is some way to resolve this problem.

Here is the sequence of steps that I tried out.
This bundle starts up and shows the status Active/Created as below.
[ 239] [Active     ] [Created     ] [       ] [   60] Test :: MyExamples

When I stop it (bundle 239), it goes to the resolved state.
[ 239] [Resolved   ] [            ] [       ] [   60] Test :: MyExamples

When I start it (bundle 239) again, it goes back to the Active/Created state.
[ 239] [Active     ] [Created     ] [       ] [   60] Test :: MyExamples

When I stop the cxf-bundle, this bundle goes to the GracePeriod state.
[ 239] [Active     ] [GracePeriod ] [       ] [   60] Test :: MyExamples

So far, it is fine. But when I start the cxf-bundle again, hoping
bundle 239 to go into state Created, unfortunately this is not
happening and instead it is going to state Failure.
[ 239] [Active     ] [Failure     ] [       ] [   60] Test :: MyExamples

The error log says "Unable to start blueprint container ..." as shown below:

10:01:43,018 | ERROR | rint Extender: 1 | BlueprintContainerImpl
    | ?                                 ? | 10 -
org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint
container for bundle cxf-blueprint
org.apache.aries.blueprint.ComponentNameAlreadyInUseException: Name
'blueprintContainer' is already in use by a registered component
        at org.apache.aries.blueprint.namespace.ComponentDefinitionRegistryImpl.
registerComponentDefinition(ComponentDefinitionRegistryImpl.java:88)[10:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:270)[10:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10:org.apache.aries.blueprint:0.3.1]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]
        at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_24]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_24]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_24]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_24]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]

To get it started again, I need to stop the bundle and start it manually.

I thought this may have something to do with my blueprint
configuration. So, I tried out the analogue procedure with the
camel-blueprint example included in SMX4. By stopping camel-blueprint
and starting it back, this camel blueprint example bundle also went
into the Failure state with the same error message.

11:38:00,792 | ERROR | rint Extender: 1 | BlueprintContainerImpl
    | ?                                 ? | 10 -
org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint
container for bundle camel-blueprint
org.apache.aries.blueprint.ComponentNameAlreadyInUseException: Name
'blueprintContainer' is already in use by a registered component
        at 
org.apache.aries.blueprint.namespace.ComponentDefinitionRegistryImpl.registerComponentDefinition(ComponentDefinitionRegistryImpl.java:88)[10:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:270)[10:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10:org.apache.aries.blueprint:0.3.1]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]
        at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_24]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_24]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_24]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_24]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]


Could someone help me with this issue?

Thanks.
Regards, aki

Reply via email to