Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.3
-
None
-
Ubuntu
Description
I've got a working blueprint bundle to register some default OBR repositories on initialization of the bundle.
The xml config looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<bean class="xxx.yyy.RepositoryRegistrationBean"
init-method="init" destroy-method="shutdown">
<argument index="0" ref="blueprintBundleContext"/>
<argument index="1" ref="repositoryAdmin"/>
</bean>
<reference id="repositoryAdmin"
interface="org.apache.felix.bundlerepository.RepositoryAdmin">
</reference>
</blueprint>
Both BundleContext & RepositoryAdmin are injected to RepositoryRegistrationBean's constructor. The init() works.
However, when i try to access the RepositoryAdmin during shutdown(), i got this exception:
2011-03-15 22:06:49,899 INFO [Thread:Gogo shell] [8/org.apache.aries.blueprint/0.3.0] org.apache.aries.blueprint.container.BeanRecipe - Error invoking destroy method
org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container is being or has been destroyed
at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:176)
at org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:49)
at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:201)
at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)
at org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)
at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)
at $Proxy6.removeRepository(Unknown Source)
at play.osgi.bundle.config.RepositoryRegistrationBean.shutdown(RepositoryRegistrationBean.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]
Reference mailing list entry http://bit.ly/e0WbRk
Attachments
Issue Links
- is a clone of
-
GERONIMO-5639 org.osgi.service.blueprint.container.ServiceUnavailableException when shutdown the server
- Closed