[
https://issues.apache.org/jira/browse/KARAF-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14645353#comment-14645353
]
Jean-Baptiste Onofré commented on KARAF-3864:
---------------------------------------------
Fixed on Cellar master:
https://git-wip-us.apache.org/repos/asf?p=karaf-cellar.git;a=commitdiff;h=cf867fdff73b12410c4802218defe91a16d24398
> Warning when shutting down system with karaf-cellar installed
> -------------------------------------------------------------
>
> Key: KARAF-3864
> URL: https://issues.apache.org/jira/browse/KARAF-3864
> Project: Karaf
> Issue Type: Bug
> Components: cellar-bundle
> Reporter: Stuart McCulloch
> Assignee: Jean-Baptiste Onofré
> Fix For: cellar-4.0.0.M1
>
> Attachments: KARAF-3864-swap-checks.patch
>
>
> We're experimenting with karaf-cellar 3.0.3 on top of karaf 3.0.4 and get the
> following warning if the system is forcibly stopped:
> {code}
> 2015-07-20 16:19:03,397+0100 WARN [FelixShutdown]
> org.apache.karaf.cellar.bundle.LocalBundleListener - CELLAR BUNDLE: can't
> check listener configuration
> org.osgi.service.blueprint.container.ServiceUnavailableException: The
> Blueprint container is being or has been destroyed:
> (objectClass=org.osgi.service.cm.ConfigurationAdmin)
> at
> org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:240)
> [org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:55)
> [org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:298)
> [org.apache.aries.blueprint.core:1.4.3]
> at Proxy90cff4fa_9fee_4d56_85e6_c006a413befa.getConfiguration(Unknown
> Source) [na:na]
> at
> org.apache.karaf.cellar.bundle.LocalBundleListener.isEnabled(LocalBundleListener.java:150)
> [org.apache.karaf.cellar.bundle:3.0.4.SNAPSHOT]
> at
> org.apache.karaf.cellar.bundle.LocalBundleListener.bundleChanged(LocalBundleListener.java:51)
> [org.apache.karaf.cellar.bundle:3.0.4.SNAPSHOT]
> at
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
> [org.apache.felix.framework-4.2.1.jar:na]
> at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
> [org.apache.felix.framework-4.2.1.jar:na]
> at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
> [org.apache.felix.framework-4.2.1.jar:na]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)
> [org.apache.felix.framework-4.2.1.jar:na]
> at org.apache.felix.framework.Felix.stopBundle(Felix.java:2520)
> [org.apache.felix.framework-4.2.1.jar:na]
> at org.apache.felix.framework.Felix$2.run(Felix.java:959)
> [org.apache.felix.framework-4.2.1.jar:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> Looking at the LocalBundleListener code it checks if the listener is enabled
> before going on to check whether the system is shutting down. However the
> "isEnabled" check uses the blueprint-injected ConfigurationAdmin service
> which is not available during shutdown. Swapping these checks round fixes the
> issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)