You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Guillaume Nodet <gn...@gmail.com> on 2010/11/05 14:02:06 UTC

Regression at shutdown in blueprint

I'm experiencing a bad behavior of the blueprint extender at shutdown:

ERROR: Error stopping bundle. (java.lang.IllegalStateException: Can
only register services while bundle is active or activating.)
java.lang.IllegalStateException: Can only register services while
bundle is active or activating.
        at org.apache.felix.framework.Felix.registerService(Felix.java:2815)
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
        at org.apache.aries.proxy.impl.ProxyManagerActivator.start(ProxyManagerActivator.java:52)
        at org.apache.aries.blueprint.uberbundle.UberActivator.stop(UberActivator.java:40)
        at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:655)
        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2197)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:680)
ERROR: EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
        at org.apache.aries.util.SingleServiceTracker.update(SingleServiceTracker.java:115)
        at org.apache.aries.util.SingleServiceTracker.findMatchingReference(SingleServiceTracker.java:106)
        at org.apache.aries.util.SingleServiceTracker.access$200(SingleServiceTracker.java:31)
        at org.apache.aries.util.SingleServiceTracker$1.serviceChanged(SingleServiceTracker.java:54)
        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
        at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3724)
        at org.apache.felix.framework.Felix.access$000(Felix.java:80)
        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
        at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135)
        at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129)
        at org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:178)
        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2215)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:680)

I think those are regressions but haven't really checked what happens yet ...

-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Regression at shutdown in blueprint

Posted by Alasdair Nottingham <no...@apache.org>.
I fixed the NPE which would have occurred anyway, but missed the other cause, thanks for spotting it.

Alasdair

Alasdair Nottingham

On 9 Nov 2010, at 23:31, Guillaume Nodet <gn...@gmail.com> wrote:

> Actually, not sure if you tried to fixed anything, but this very
> exception was caused by the bundle activator stop() method calling
> start() instead of stop() on the proxy bundle activator.  I've fixed
> that and that exception went away.
> 
> On Fri, Nov 5, 2010 at 15:58, Alasdair Nottingham <no...@apache.org> wrote:
>> Hi,
>> 
>> This is a regression. It is as a result of the proxy refactor I've
>> been working on. I think I have a fix.
>> 
>> Alasdair
>> 
>> On 5 November 2010 13:02, Guillaume Nodet <gn...@gmail.com> wrote:
>>> I'm experiencing a bad behavior of the blueprint extender at shutdown:
>>> 
>>> ERROR: Error stopping bundle. (java.lang.IllegalStateException: Can
>>> only register services while bundle is active or activating.)
>>> java.lang.IllegalStateException: Can only register services while
>>> bundle is active or activating.
>>>        at org.apache.felix.framework.Felix.registerService(Felix.java:2815)
>>>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
>>>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
>>>        at org.apache.aries.proxy.impl.ProxyManagerActivator.start(ProxyManagerActivator.java:52)
>>>        at org.apache.aries.blueprint.uberbundle.UberActivator.stop(UberActivator.java:40)
>>>        at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:655)
>>>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2197)
>>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>>        at java.lang.Thread.run(Thread.java:680)
>>> ERROR: EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
>>> java.lang.NullPointerException
>>>        at org.apache.aries.util.SingleServiceTracker.update(SingleServiceTracker.java:115)
>>>        at org.apache.aries.util.SingleServiceTracker.findMatchingReference(SingleServiceTracker.java:106)
>>>        at org.apache.aries.util.SingleServiceTracker.access$200(SingleServiceTracker.java:31)
>>>        at org.apache.aries.util.SingleServiceTracker$1.serviceChanged(SingleServiceTracker.java:54)
>>>        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
>>>        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
>>>        at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>>>        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3724)
>>>        at org.apache.felix.framework.Felix.access$000(Felix.java:80)
>>>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
>>>        at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135)
>>>        at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129)
>>>        at org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:178)
>>>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2215)
>>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>>        at java.lang.Thread.run(Thread.java:680)
>>> 
>>> I think those are regressions but haven't really checked what happens yet ...
>>> 
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>> 
>> 
>> 
>> 
>> --
>> Alasdair Nottingham
>> not@apache.org
>> 
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

Re: Regression at shutdown in blueprint

Posted by Guillaume Nodet <gn...@gmail.com>.
Actually, not sure if you tried to fixed anything, but this very
exception was caused by the bundle activator stop() method calling
start() instead of stop() on the proxy bundle activator.  I've fixed
that and that exception went away.

On Fri, Nov 5, 2010 at 15:58, Alasdair Nottingham <no...@apache.org> wrote:
> Hi,
>
> This is a regression. It is as a result of the proxy refactor I've
> been working on. I think I have a fix.
>
> Alasdair
>
> On 5 November 2010 13:02, Guillaume Nodet <gn...@gmail.com> wrote:
>> I'm experiencing a bad behavior of the blueprint extender at shutdown:
>>
>> ERROR: Error stopping bundle. (java.lang.IllegalStateException: Can
>> only register services while bundle is active or activating.)
>> java.lang.IllegalStateException: Can only register services while
>> bundle is active or activating.
>>        at org.apache.felix.framework.Felix.registerService(Felix.java:2815)
>>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
>>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
>>        at org.apache.aries.proxy.impl.ProxyManagerActivator.start(ProxyManagerActivator.java:52)
>>        at org.apache.aries.blueprint.uberbundle.UberActivator.stop(UberActivator.java:40)
>>        at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:655)
>>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2197)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:680)
>> ERROR: EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
>> java.lang.NullPointerException
>>        at org.apache.aries.util.SingleServiceTracker.update(SingleServiceTracker.java:115)
>>        at org.apache.aries.util.SingleServiceTracker.findMatchingReference(SingleServiceTracker.java:106)
>>        at org.apache.aries.util.SingleServiceTracker.access$200(SingleServiceTracker.java:31)
>>        at org.apache.aries.util.SingleServiceTracker$1.serviceChanged(SingleServiceTracker.java:54)
>>        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
>>        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
>>        at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>>        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3724)
>>        at org.apache.felix.framework.Felix.access$000(Felix.java:80)
>>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
>>        at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135)
>>        at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129)
>>        at org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:178)
>>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2215)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:680)
>>
>> I think those are regressions but haven't really checked what happens yet ...
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>
>
>
> --
> Alasdair Nottingham
> not@apache.org
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Regression at shutdown in blueprint

Posted by Guillaume Nodet <gn...@gmail.com>.
Cool, thx a ton!

On Fri, Nov 5, 2010 at 15:58, Alasdair Nottingham <no...@apache.org> wrote:
> Hi,
>
> This is a regression. It is as a result of the proxy refactor I've
> been working on. I think I have a fix.
>
> Alasdair
>
> On 5 November 2010 13:02, Guillaume Nodet <gn...@gmail.com> wrote:
>> I'm experiencing a bad behavior of the blueprint extender at shutdown:
>>
>> ERROR: Error stopping bundle. (java.lang.IllegalStateException: Can
>> only register services while bundle is active or activating.)
>> java.lang.IllegalStateException: Can only register services while
>> bundle is active or activating.
>>        at org.apache.felix.framework.Felix.registerService(Felix.java:2815)
>>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
>>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
>>        at org.apache.aries.proxy.impl.ProxyManagerActivator.start(ProxyManagerActivator.java:52)
>>        at org.apache.aries.blueprint.uberbundle.UberActivator.stop(UberActivator.java:40)
>>        at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:655)
>>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2197)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:680)
>> ERROR: EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
>> java.lang.NullPointerException
>>        at org.apache.aries.util.SingleServiceTracker.update(SingleServiceTracker.java:115)
>>        at org.apache.aries.util.SingleServiceTracker.findMatchingReference(SingleServiceTracker.java:106)
>>        at org.apache.aries.util.SingleServiceTracker.access$200(SingleServiceTracker.java:31)
>>        at org.apache.aries.util.SingleServiceTracker$1.serviceChanged(SingleServiceTracker.java:54)
>>        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
>>        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
>>        at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>>        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3724)
>>        at org.apache.felix.framework.Felix.access$000(Felix.java:80)
>>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
>>        at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135)
>>        at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129)
>>        at org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:178)
>>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2215)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:680)
>>
>> I think those are regressions but haven't really checked what happens yet ...
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>
>
>
> --
> Alasdair Nottingham
> not@apache.org
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Regression at shutdown in blueprint

Posted by Alasdair Nottingham <no...@apache.org>.
Hi,

This is a regression. It is as a result of the proxy refactor I've
been working on. I think I have a fix.

Alasdair

On 5 November 2010 13:02, Guillaume Nodet <gn...@gmail.com> wrote:
> I'm experiencing a bad behavior of the blueprint extender at shutdown:
>
> ERROR: Error stopping bundle. (java.lang.IllegalStateException: Can
> only register services while bundle is active or activating.)
> java.lang.IllegalStateException: Can only register services while
> bundle is active or activating.
>        at org.apache.felix.framework.Felix.registerService(Felix.java:2815)
>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
>        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
>        at org.apache.aries.proxy.impl.ProxyManagerActivator.start(ProxyManagerActivator.java:52)
>        at org.apache.aries.blueprint.uberbundle.UberActivator.stop(UberActivator.java:40)
>        at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:655)
>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2197)
>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>        at java.lang.Thread.run(Thread.java:680)
> ERROR: EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.aries.util.SingleServiceTracker.update(SingleServiceTracker.java:115)
>        at org.apache.aries.util.SingleServiceTracker.findMatchingReference(SingleServiceTracker.java:106)
>        at org.apache.aries.util.SingleServiceTracker.access$200(SingleServiceTracker.java:31)
>        at org.apache.aries.util.SingleServiceTracker$1.serviceChanged(SingleServiceTracker.java:54)
>        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
>        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
>        at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3724)
>        at org.apache.felix.framework.Felix.access$000(Felix.java:80)
>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
>        at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135)
>        at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129)
>        at org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:178)
>        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2215)
>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1172)
>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>        at java.lang.Thread.run(Thread.java:680)
>
> I think those are regressions but haven't really checked what happens yet ...
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Alasdair Nottingham
not@apache.org