felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4210) Error "BundleContext is no longer valid" while activating component
Date Sat, 14 Sep 2013 16:20:52 GMT

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

David Jencks commented on FELIX-4210:
-------------------------------------

The code in scr already changed dramatically between 1.6 (three years ago) and 1.6.2 (nearly
one year ago).  Since then there have been numerous major bug fixes.  Please check that any
problems you have are still present in trunk code.  As for when 1.8 might be released, I've
implemented all the features I want in it and am waiting for a period of a few weeks in which
I don't find serious problems.
                
> Error "BundleContext is no longer valid" while activating component
> -------------------------------------------------------------------
>
>                 Key: FELIX-4210
>                 URL: https://issues.apache.org/jira/browse/FELIX-4210
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions:  scr-1.6.0
>            Reporter: Christoph Läubrich
>            Assignee: David Jencks
>            Priority: Minor
>
> From time to time the following Exception is thrown in the logs saiing that a component
can't be activated:
> !STACK 0
> java.lang.IllegalStateException: BundleContext is no longer valid
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid(BundleContextImpl.java:931)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.createFilter(BundleContextImpl.java:917)
> 	at org.apache.felix.scr.impl.manager.DependencyManager.setTargetFilter(DependencyManager.java:1265)
> 	at org.apache.felix.scr.impl.manager.DependencyManager.<init>(DependencyManager.java:106)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.loadDependencyManagers(AbstractComponentManager.java:586)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.<init>(AbstractComponentManager.java:86)
> 	at org.apache.felix.scr.impl.manager.ImmediateComponentManager.<init>(ImmediateComponentManager.java:86)
> 	at org.apache.felix.scr.impl.config.AbstractComponentHolder.createComponentManager(AbstractComponentHolder.java:54)
> 	at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.<init>(ConfiguredComponentHolder.java:99)
> 	at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.createComponentHolder(ConfigurationComponentRegistry.java:115)
> 	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:244)
> 	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
> 	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
> 	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285)
> 	at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:203)
> 	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
> 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> 	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> 	at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1523)
> 	at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1459)
> 	at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1454)
> 	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:391)
> 	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
> 	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
> 	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
> 	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
> 	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
> 	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
> 	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
> 	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
> 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> 	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> The problem seems, that SCR tries to create Filter for a component, but was deactivated/refreshed
in the process of doing so.
> The API (http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html#createFilter%28java.lang.String%29)
says:
> java.lang.IllegalStateException - If this BundleContext is no longer valid.
> so it seems valid for me that SCR catch and silently ignore this instead of reporting
this as an error of the component beeing activated.

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

Mime
View raw message