java.lang.IllegalStateException: BundleContext is no longer valid

openhab.org | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.

Root Cause Analysis

  1. java.lang.IllegalStateException

    BundleContext is no longer valid

    at org.eclipse.osgi.internal.framework.BundleContextImpl.checkValid()
  2. Eclipse OSGi
    BundleContextImpl.ungetService
    1. org.eclipse.osgi.internal.framework.BundleContextImpl.checkValid(BundleContextImpl.java:983)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    2. org.eclipse.osgi.internal.framework.BundleContextImpl.ungetService(BundleContextImpl.java:659)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    2 frames
  3. OSGi
    ServiceTracker.close
    1. org.osgi.util.tracker.ServiceTracker.removedService(ServiceTracker.java:459)[org.osgi.core-6.0.0.jar:]
    2. org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)[org.osgi.core-6.0.0.jar:]
    3. org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:]
    4. org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)[org.osgi.core-6.0.0.jar:]
    5. org.osgi.util.tracker.ServiceTracker.close(ServiceTracker.java:377)[org.osgi.core-6.0.0.jar:]
    5 frames
  4. Apache Felix Declarative Services
    Activator$ScrExtension.destroy
    1. org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:549)[33:org.apache.felix.scr:2.0.2]
    2. org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:414)[33:org.apache.felix.scr:2.0.2]
    3. org.apache.felix.scr.impl.Activator.access$300(Activator.java:53)[33:org.apache.felix.scr:2.0.2]
    4. org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:273)[33:org.apache.felix.scr:2.0.2]
    4 frames
  5. Apache Felix Bundle Repository
    AbstractExtender$2.run
    1. org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:290)[33:org.apache.felix.scr:2.0.2]
    1 frame
  6. Java RT
    FutureTask.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
    2 frames
  7. Apache Felix Bundle Repository
    AbstractExtender.bundleChanged
    1. org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:312)[33:org.apache.felix.scr:2.0.2]
    2. org.apache.felix.utils.extender.AbstractExtender.bundleChanged(AbstractExtender.java:186)[33:org.apache.felix.scr:2.0.2]
    2 frames
  8. Eclipse OSGi
    EquinoxBundle.update
    1. org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    2. org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    3. org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    4. org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    5. org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    6. org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    7. org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    8. org.eclipse.osgi.container.ModuleContainer.update(ModuleContainer.java:342)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    9. org.eclipse.osgi.storage.Storage.update(Storage.java:713)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    10. org.eclipse.osgi.internal.framework.EquinoxBundle.update(EquinoxBundle.java:439)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
    10 frames
  9. org.apache.karaf
    FeaturesServiceImpl$1.call
    1. org.apache.karaf.features.internal.service.FeaturesServiceImpl.updateBundle(FeaturesServiceImpl.java:1185)[9:org.apache.karaf.features.core:4.0.4]
    2. org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:688)[9:org.apache.karaf.features.core:4.0.4]
    3. org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1089)[9:org.apache.karaf.features.core:4.0.4]
    4. org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:985)[9:org.apache.karaf.features.core:4.0.4]
    4 frames
  10. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
    4. java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
    4 frames