You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Toni Menzel <to...@rebaze.com> on 2016/10/26 11:23:57 UTC

java.lang.IllegalStateException: Configuration Admin service has been unregistered

Hey (again),

i am a bit puzzled with a IllegalStateException when interacting with Felix
ConfigAdmin via DS:

Daemon Thread [CM Event Dispatcher (Fire ConfigurationEvent:
pid=xxxx.ConnectionPid)] (Suspended (entry into method dispose in
ConfigurationAdminImpl))

                ConfigurationAdminImpl.dispose() line: 56

                ConfigurationAdminFactory.ungetService(Bundle,
ServiceRegistration, Object) line: 63

                ServiceRegistrationImpl.ungetFactoryUnchecked(Bundle,
Object) line: 388

                ServiceRegistrationImpl.ungetService(Bundle, Object) line:
286

                ServiceRegistry.ungetService(Bundle, ServiceReference<?>,
Object) line: 470

                Felix.ungetService(Bundle, ServiceReference, Object) line:
3711

                BundleContextImpl.ungetService(ServiceReference<?>) line:
483


ComponentRegistry$3(RegionConfigurationSupport).getConfigurationInfo(TargetedPID,
TargetedPID, ComponentHolder<?>, BundleContext) line: 465


ComponentRegistry$3(RegionConfigurationSupport).configurationEvent(ConfigurationEvent)
line: 259

                ConfigurationManager$FireConfigurationEvent.sendEvent(int)
line: 2046

                ConfigurationManager$FireConfigurationEvent.run() line:
2014

                UpdateThread.run() line: 103

                Thread.run() line: 745



Here is what I have:
https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f

Now, with
https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-updaterimpl-java
we get the IllegalStateException upon 2nd call to updateConfig..

With
https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-updaterimplalternative-java
we
do not get the problem.

So, is this the intended way do this? Just lookup the configuration once
and keep using it?
What if i do need to get another configurationPid? I guess the ConfigAdmin
would again give that Exception.

Thanks,
Toni

*Toni Menzel*


*Developing The Rebaze Way*

*www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com
<http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*

Re: java.lang.IllegalStateException: Configuration Admin service has been unregistered

Posted by Carsten Ziegeler <cz...@apache.org>.
Toni Menzel wrote
> yep SCR 2.0.6 helps. thanks!
> 

That would have been my response :)

Great!

 Carsten

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: java.lang.IllegalStateException: Configuration Admin service has been unregistered

Posted by Toni Menzel <to...@rebaze.com>.
yep SCR 2.0.6 helps. thanks!

Re: java.lang.IllegalStateException: Configuration Admin service has been unregistered

Posted by Toni Menzel <to...@rebaze.com>.
2.0.2

okay, let me check with 2.0.6..

*Toni Menzel*


*Developing The Rebaze Way*

*www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com
<http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*

On Wed, Oct 26, 2016 at 1:29 PM, Carsten Ziegeler <cz...@apache.org>
wrote:

> This sounds familiar to me, which SCR version are you using?
>
> Regards
> Carsten
>
> Toni Menzel wrote
> > Hey (again),
> >
> > i am a bit puzzled with a IllegalStateException when interacting with
> Felix
> > ConfigAdmin via DS:
> >
> > Daemon Thread [CM Event Dispatcher (Fire ConfigurationEvent:
> > pid=xxxx.ConnectionPid)] (Suspended (entry into method dispose in
> > ConfigurationAdminImpl))
> >
> >                 ConfigurationAdminImpl.dispose() line: 56
> >
> >                 ConfigurationAdminFactory.ungetService(Bundle,
> > ServiceRegistration, Object) line: 63
> >
> >                 ServiceRegistrationImpl.ungetFactoryUnchecked(Bundle,
> > Object) line: 388
> >
> >                 ServiceRegistrationImpl.ungetService(Bundle, Object)
> line:
> > 286
> >
> >                 ServiceRegistry.ungetService(Bundle,
> ServiceReference<?>,
> > Object) line: 470
> >
> >                 Felix.ungetService(Bundle, ServiceReference, Object)
> line:
> > 3711
> >
> >                 BundleContextImpl.ungetService(ServiceReference<?>)
> line:
> > 483
> >
> >
> > ComponentRegistry$3(RegionConfigurationSupport).getConfigurationInfo(
> TargetedPID,
> > TargetedPID, ComponentHolder<?>, BundleContext) line: 465
> >
> >
> > ComponentRegistry$3(RegionConfigurationSupport).configurationEvent(
> ConfigurationEvent)
> > line: 259
> >
> >                 ConfigurationManager$FireConfigurationEvent.
> sendEvent(int)
> > line: 2046
> >
> >                 ConfigurationManager$FireConfigurationEvent.run() line:
> > 2014
> >
> >                 UpdateThread.run() line: 103
> >
> >                 Thread.run() line: 745
> >
> >
> >
> > Here is what I have:
> > https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f
> >
> > Now, with
> > https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f999
> 0f#file-updaterimpl-java
> > we get the IllegalStateException upon 2nd call to updateConfig..
> >
> > With
> > https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-
> updaterimplalternative-java
> > we
> > do not get the problem.
> >
> > So, is this the intended way do this? Just lookup the configuration once
> > and keep using it?
> > What if i do need to get another configurationPid? I guess the
> ConfigAdmin
> > would again give that Exception.
> >
> > Thanks,
> > Toni
> >
> > *Toni Menzel*
> >
> >
> > *Developing The Rebaze Way*
> >
> > *www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com
> > <http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: java.lang.IllegalStateException: Configuration Admin service has been unregistered

Posted by Carsten Ziegeler <cz...@apache.org>.
This sounds familiar to me, which SCR version are you using?

Regards
Carsten

Toni Menzel wrote
> Hey (again),
> 
> i am a bit puzzled with a IllegalStateException when interacting with Felix
> ConfigAdmin via DS:
> 
> Daemon Thread [CM Event Dispatcher (Fire ConfigurationEvent:
> pid=xxxx.ConnectionPid)] (Suspended (entry into method dispose in
> ConfigurationAdminImpl))
> 
>                 ConfigurationAdminImpl.dispose() line: 56
> 
>                 ConfigurationAdminFactory.ungetService(Bundle,
> ServiceRegistration, Object) line: 63
> 
>                 ServiceRegistrationImpl.ungetFactoryUnchecked(Bundle,
> Object) line: 388
> 
>                 ServiceRegistrationImpl.ungetService(Bundle, Object) line:
> 286
> 
>                 ServiceRegistry.ungetService(Bundle, ServiceReference<?>,
> Object) line: 470
> 
>                 Felix.ungetService(Bundle, ServiceReference, Object) line:
> 3711
> 
>                 BundleContextImpl.ungetService(ServiceReference<?>) line:
> 483
> 
> 
> ComponentRegistry$3(RegionConfigurationSupport).getConfigurationInfo(TargetedPID,
> TargetedPID, ComponentHolder<?>, BundleContext) line: 465
> 
> 
> ComponentRegistry$3(RegionConfigurationSupport).configurationEvent(ConfigurationEvent)
> line: 259
> 
>                 ConfigurationManager$FireConfigurationEvent.sendEvent(int)
> line: 2046
> 
>                 ConfigurationManager$FireConfigurationEvent.run() line:
> 2014
> 
>                 UpdateThread.run() line: 103
> 
>                 Thread.run() line: 745
> 
> 
> 
> Here is what I have:
> https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f
> 
> Now, with
> https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-updaterimpl-java
> we get the IllegalStateException upon 2nd call to updateConfig..
> 
> With
> https://gist.github.com/tonit/8a4c7b118a5ac282313f49f509f9990f#file-updaterimplalternative-java
> we
> do not get the problem.
> 
> So, is this the intended way do this? Just lookup the configuration once
> and keep using it?
> What if i do need to get another configurationPid? I guess the ConfigAdmin
> would again give that Exception.
> 
> Thanks,
> Toni
> 
> *Toni Menzel*
> 
> 
> *Developing The Rebaze Way*
> 
> *www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com
> <http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org