java.lang.IllegalStateException: BundleContext is no longer valid

Liferay Issues | Norbert Kocsis | 2 years ago
  1. 0

    *Steps to reproduce:* # Set in portal-ext: {noformat}module.framework.properties.osgi.console=11311{noformat} # Start a Liferay 6.2 SP10 bundle # Download Audience Targeting from Marketplace and deploy it # In LIFERAY_HOME/data/osgi/ create a modules directory and copy the *.jar files from Audience Targeting EE.lpkg into that # Restart the portal # Connect to the osgi telnet console on localhost 11311 # List bundles by typing into the console: {noformat}lb{noformat} # Stop an arbitrary bundle from audience targeting by typing into the console {noformat}stop $bundleId{noformat} *RESULT:* Error occurs during undeploy process. The error message: {code}11:13:12,562 INFO [fileinstall-/home/hans/redtree/idewe/runtimes/liferay-portal/data/osgi/modules][HookHotDeployListener:952] Hook for liferay-idewe-service-group-rule was unregistered Mar 10, 2015 11:13:12 AM org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 11:13:12,563 INFO [fileinstall-/home/hans/redtree/idewe/runtimes/liferay-portal/data/osgi/modules][PluginPackageUtil:1016] Reading plugin package for liferay-idewe-service-group-rule 11:13:12,565 ERROR [com.liferay.portal.log.bridge.internal.LogBridge@3aeeb642][org_eclipse_osgi:75] An unexpected runtime error has occurred. java.lang.IllegalStateException: BundleContext is no longer valid at org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid(BundleContextImpl.java:931) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.ungetService(BundleContextImpl.java:634) at com.liferay.content.targeting.deploy.hot.extender.internal.activator.HotDeployTrackerComponent$ServletContextTrackerCustomizer.removedService(HotDeployTrackerComponent.java:214) at com.liferay.content.targeting.deploy.hot.extender.internal.activator.HotDeployTrackerComponent$ServletContextTrackerCustomizer.removedService(HotDeployTrackerComponent.java:1) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:956) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1) at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:902) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:225) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.unregisterServices(ServiceRegistry.java:635) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.close(BundleContextImpl.java:88) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:514) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop(AbstractBundle.java:465){code}

    Liferay Issues | 2 years ago | Norbert Kocsis
    java.lang.IllegalStateException: BundleContext is no longer valid
  2. 0

    [WCM-368] Stopping OSGI bundle for Audience Targeting triggers error - Liferay Issues

    liferay.com | 12 months ago
    java.lang.IllegalStateException: BundleContext is no longer valid
  3. 0

    Problems with "spell check" example

    Google Groups | 1 decade ago | John Arthorne
    java.lang.IllegalStateException: BundleContext is no longer valid
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ContextLoaderBundleActivator question

    Google Groups | 1 decade ago | Martin Lippert
    java.lang.IllegalStateException: BundleContext is no longer valid
  6. 0

    o.e.update.configurator BundleException on stop at end of Unittests

    Eclipse Bugzilla | 7 years ago | martin.oberhuber
    java.lang.IllegalStateException: BundleContext is no longer valid

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      BundleContext is no longer valid

      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid()
    2. Eclipse OSGi
      BundleContextImpl.ungetService
      1. org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid(BundleContextImpl.java:931)
      2. org.eclipse.osgi.framework.internal.core.BundleContextImpl.ungetService(BundleContextImpl.java:634)
      2 frames
    3. com.liferay.content
      HotDeployTrackerComponent$ServletContextTrackerCustomizer.removedService
      1. com.liferay.content.targeting.deploy.hot.extender.internal.activator.HotDeployTrackerComponent$ServletContextTrackerCustomizer.removedService(HotDeployTrackerComponent.java:214)
      2. com.liferay.content.targeting.deploy.hot.extender.internal.activator.HotDeployTrackerComponent$ServletContextTrackerCustomizer.removedService(HotDeployTrackerComponent.java:1)
      2 frames
    4. OSGi
      ServiceTracker$Tracked.serviceChanged
      1. org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:956)
      2. org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
      3. org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
      4. org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:902)
      4 frames
    5. Eclipse OSGi
      FilteredServiceListener.serviceChanged
      1. org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
      1 frame
    6. Eclipse OSGi
      BundleContextImpl.dispatchEvent
      1. org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
      1 frame
    7. Eclipse OSGi
      ServiceRegistry.unregisterServices
      1. org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      2. org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
      3. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
      4. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
      5. org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:225)
      6. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.unregisterServices(ServiceRegistry.java:635)
      6 frames
    8. Eclipse OSGi
      BundleHost.stopWorker
      1. org.eclipse.osgi.framework.internal.core.BundleContextImpl.close(BundleContextImpl.java:88)
      2. org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:514)
      2 frames