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

[jira] [Commented] (ARIES-1005) BundleHookBundleTracker throws Exception when close()-method is called twice

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

Christoph Gritschenberger commented on ARIES-1005:
--------------------------------------------------

This can be observed when shutting down karaf [trunk] (with blueprint-core upgraded 1.1.0-SNAPSHOT)

{code}
ERROR: Bundle org.apache.aries.blueprint.core [5] Error stopping bundle. (java.lang.IllegalStateException: Service already unregistered.)
java.lang.IllegalStateException: Service already unregistered.
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:123)
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker.close(BundleHookBundleTracker.java:88)
	at org.apache.aries.util.tracker.RecursiveBundleTracker.close(RecursiveBundleTracker.java:106)
	at org.apache.aries.blueprint.container.BlueprintExtender.stop(BlueprintExtender.java:160)
	at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:667)
	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2361)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
	at java.lang.Thread.run(Thread.java:722)
ERROR: Bundle org.apache.aries.blueprint.core [5] Error stopping mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.1.0-SUP-01 (org.osgi.framework.BundleException: Activator stop error in bundle org.apache.aries.blueprint.core [5].)
java.lang.IllegalStateException: Service already unregistered.
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:123)
	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker.close(BundleHookBundleTracker.java:88)
	at org.apache.aries.util.tracker.RecursiveBundleTracker.close(RecursiveBundleTracker.java:106)
	at org.apache.aries.blueprint.container.BlueprintExtender.stop(BlueprintExtender.java:160)
	at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:667)
	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2361)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
	at java.lang.Thread.run(Thread.java:722)
Listening for transport dt_socket at address: 5005

{code}
                
> BundleHookBundleTracker throws Exception when close()-method is called twice
> ----------------------------------------------------------------------------
>
>                 Key: ARIES-1005
>                 URL: https://issues.apache.org/jira/browse/ARIES-1005
>             Project: Aries
>          Issue Type: Bug
>          Components: Util
>            Reporter: Christoph Gritschenberger
>
> {code}
>   public void close() {
>       sr.unregister();
>       tracked.close();
>       tracked = null;
>   }
> {code}
> Supsequent calls cause sr.unregister to throw an IllegalStateException.
> Since today, there is a piece of code introduced by ARIES-1004 that does actually do that (http://mail-archives.apache.org/mod_mbox/aries-commits/201301.mbox/%3C20130118083142.DA5852388900%40eris.apache.org%3E)

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