[ 
https://issues.apache.org/jira/browse/KARAF-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré reassigned KARAF-3864:
-------------------------------------------

    Assignee: Jean-Baptiste Onofré

> 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é
>         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)

Reply via email to