You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "John Ross (JIRA)" <ji...@apache.org> on 2013/01/02 17:52:12 UTC

[jira] [Commented] (ARIES-992) Get an IllegalStateException in BundleEventHook.handleExplicitlyInstalledBundleBundleContext

    [ https://issues.apache.org/jira/browse/ARIES-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542231#comment-13542231 ] 

John Ross commented on ARIES-992:
---------------------------------

This can happen when explicitly installing or uninstalling bundles while the subsystems bundle is deactivating. The bundle event hook must be blocked while the root subsystem is being stopped. The blocked events then proceed once deactivation is complete which results in the exception since the activator instance is no longer valid.

I think the right solution here is to queue up events while subsystems is shutting down, as they are during initialization, then ensure all pending events are processed just before deactivation is completed.
                
> Get an IllegalStateException in BundleEventHook.handleExplicitlyInstalledBundleBundleContext
> --------------------------------------------------------------------------------------------
>
>                 Key: ARIES-992
>                 URL: https://issues.apache.org/jira/browse/ARIES-992
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: Thomas Watson
>
> I'm not really sure what caused this to happen.  It could have been on framework shutdown while another thread is installing bundles which could explain why the activator instance was nulled out while the BundleEventHook was in the middle of processing a bundle event.  Here is the stack trace.
> >Caused by: java.lang.IllegalStateException: The activator has not been initialized or has been shutdown
> >	at org.apache.aries.subsystem.core.internal.Activator.checkInstance(Activator.java:65)
> >	at org.apache.aries.subsystem.core.internal.Activator.getInstance(Activator.java:57)
> >	at org.apache.aries.subsystem.core.internal.Utils.createCoordination(Utils.java:38)
> >	at org.apache.aries.subsystem.core.internal.Utils.installResource(Utils.java:72)
> >	at org.apache.aries.subsystem.core.internal.BundleEventHook.handleExplicitlyInstalledBundleBundleContext(BundleEventHook.java:82)
> >	at org.apache.aries.subsystem.core.internal.BundleEventHook.handleInstalledEvent(BundleEventHook.java:116)
> >	at org.apache.aries.subsystem.core.internal.BundleEventHook.event(BundleEventHook.java:55)
> >	at org.eclipse.osgi.framework.internal.core.Framework$10.call(Framework.java:1606)
> >	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHookPrivileged(ServiceRegistry.java:1239)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira