You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by XiLai Dai <xl...@talend.com> on 2013/11/28 08:58:17 UTC

ServiceUnavailableException: The Blueprint container is being or has been destroyed

Hi, there,

We run into this problem: ServiceUnavailableException: The Blueprint container is being or has been destroyed

With this scenario:
Bundle A has a blueprint configuration:
<reference id="cryptoProvider" interface="org.apache.ws.security.components.crypto.Crypto" />
Bundle B expose this service via blueprint:
<reference id="xkmsCryptoProviderFactory" interface="org.apache.cxf.xkms.crypto.CryptoProviderFactory" />
    <bean id="serviceCryptoBean" factory-ref="xkmsCryptoProviderFactory" factory-method="create" />
<service interface="org.apache.ws.security.components.crypto.Crypto" ref="serviceCryptoBean">
Deploy bundle B and bundle A into osgi container, they work well for first time.
Undeploy A, undeploy B, then redeploy B and A, then, "The Blueprint container is being or has been destroyed" will be thrown.

Is something known issue or like an arise bug ? Or is there other blueprint attribute which support the bean created by factory class still can be reused as an osgi service?

Thanks in advance!

The exception details:
org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container is being or has been destroyed: (objectClass=org.apache.ws.security.components.crypto.Crypto)
         at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:233)[7:org.apache.aries.blueprint.core:1.1.0]
         at org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:54)[7:org.apache.aries.blueprint.core:1.1.0]
         at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:291)[7:org.apache.aries.blueprint.core:1.1.0]
         at Proxy50b12eff_1e8b_4e97_9ab0_8b6f5745a362.verifyTrust(Unknown Source)[:]