Yes I see these from time to time as well. They are usually caused by
attempting to uninstall a bundle from another thread while the framework is
shutting down. At a certain point in the shutdown process, all
BundleContexts (including the system bundle's) become invalid, hence the
exception.

They are indeed harmless. Or at least, I have been ignoring them for years
:-)

Neil

On Thu, Mar 21, 2013 at 11:32 AM, Martin Lichtin <[email protected]> wrote:

> Hi All
> Getting the following exception during shutdown:
>
>
> java.lang.IllegalStateException: Invalid BundleContext.
>     at
> org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514)
>     at
> org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:473)
>     at
> org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.removedService(ServiceDependencyImpl.java:524)
>     at
> org.apache.felix.dm.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1351)
>     at
> org.apache.felix.dm.tracker.AbstractTracked.untrack(AbstractTracked.java:359)
>     at
> org.apache.felix.dm.tracker.ServiceTracker$Tracked.serviceChangedHideAspects(ServiceTracker.java:1285)
>     at
> org.apache.felix.dm.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1101)
>     at
> org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
>     at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
>     at
> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
>     at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260)
>     at org.apache.felix.framework.Felix.access$000(Felix.java:74)
>     at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390)
>     at
> org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:148)
>     at
> org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127)
>     at
> org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:191)
>     at org.apache.felix.framework.Felix.stopBundle(Felix.java:2386)
>     at org.apache.felix.framework.Felix.uninstallBundle(Felix.java:2463)
>     at
> org.apache.felix.framework.BundleImpl.uninstall(BundleImpl.java:1012)
>     at
> org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.uninstallBundle(RemoteBundleContextImpl.java:125)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:601)
>     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
>     at sun.rmi.transport.Transport$1.run(Transport.java:177)
>     at sun.rmi.transport.Transport$1.run(Transport.java:174)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
>     at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
>     at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
>     at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at java.lang.Thread.run(Thread.java:722)
>
> It seems harmless, just wanted to report. Running a tooling-exam test
> using Karaf 2.3.1.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to