-
Bug
-
Resolution: Fixed
-
Low
-
3.3, 3.4, 3.5.3
When shutting down confluence gracefully, it will emit a whole slew of runtime exceptions, due to the plugin system trying to emit events after the cache manager is stopped. Confluence will emit one of these stack traces per module descriptor that was enabled, and one per plugin that was enabled.
02/12/2010 2:03:18 PM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 02/12/2010 2:03:19 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina 2010-12-02 14:03:19,466 INFO [main] [confluence.importexport.impl.ConfluenceLocalSessionFactoryBeanForBackup] destroy Closing Hibernate SessionFactory 2010-12-02 14:03:19,479 INFO [main] [atlassian.plugin.manager.DefaultPluginManager] shutdown Shutting down the plugin system 2010-12-02 14:03:19,543 ERROR [Timer-4] [osgi.container.felix.FelixOsgiContainerManager] doLog EventDispatcher: Error during dispatch. com.atlassian.plugin.event.NotificationException: java.lang.RuntimeException: The CacheManager has been shut down. It can no longer be used. at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:92) at com.atlassian.plugin.osgi.factory.UnrecognizedModuleDescriptorServiceTrackerCustomizer.removedService(UnrecognizedModuleDescriptorServiceTrackerCustomizer.java:138) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:922) at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:351) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:865) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3726) 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.springframework.osgi.service.exporter.support.internal.support.ServiceRegistrationDecorator.unregister(ServiceRegistrationDecorator.java:65) at org.springframework.osgi.util.OsgiServiceUtils.unregisterService(OsgiServiceUtils.java:41) at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:372) at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:362) at org.springframework.osgi.service.exporter.support.AbstractOsgiServiceExporter.destroy(AbstractOsgiServiceExporter.java:84) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:151) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:462) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:430) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:853) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.destroyBeans(AbstractOsgiBundleApplicationContext.java:204) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:831) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.doClose(AbstractOsgiBundleApplicationContext.java:197) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$501(AbstractDelegatedExecutionApplicationContext.java:69) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$2.run(AbstractDelegatedExecutionApplicationContext.java:214) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalClose(AbstractDelegatedExecutionApplicationContext.java:210) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:374) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.doClose(AbstractDelegatedExecutionApplicationContext.java:236) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:794) at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$1.run(ContextLoaderListener.java:522) at org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution$MonitoredRunnable.run(RunnableTimedExecution.java:60) at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:66) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.lang.RuntimeException: The CacheManager has been shut down. It can no longer be used. at com.atlassian.plugin.event.impl.MethodSelectorListenerHandler$1$1.invoke(MethodSelectorListenerHandler.java:67) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:145) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:67) at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:88) ... 37 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.event.impl.MethodSelectorListenerHandler$1$1.invoke(MethodSelectorListenerHandler.java:49) ... 43 more Caused by: java.lang.IllegalStateException: The CacheManager has been shut down. It can no longer be used. at net.sf.ehcache.CacheManager.checkStatus(CacheManager.java:827) at net.sf.ehcache.CacheManager.getCache(CacheManager.java:536) at com.atlassian.confluence.cache.ehcache.EhCacheManager.getCache(EhCacheManager.java:68) at com.atlassian.confluence.cache.TransactionalCacheFactory.getCache(TransactionalCacheFactory.java:63) at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.getCache(ConfluenceCachingBandanaPersister.java:41) at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java:54) at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:32) at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:24) at com.atlassian.confluence.plugin.BandanaPluginStateStore.load(BandanaPluginStateStore.java:29) at com.atlassian.plugin.manager.DefaultPluginManager.getBuilder(DefaultPluginManager.java:1529) at com.atlassian.plugin.manager.DefaultPluginManager.disablePluginModuleState(DefaultPluginManager.java:1364) at com.atlassian.confluence.plugin.ConfluencePluginManager.notifyModuleDisabled(ConfluencePluginManager.java:111) at com.atlassian.plugin.manager.DefaultPluginManager.onPluginModuleUnavailable(DefaultPluginManager.java:251) ... 48 more
Addtionally, logging itself seems to get disabled before we stop trying to use it:
2010-12-02 14:03:20,765 INFO [main] [com.atlassian.confluence.lifecycle] contextDestroyed Stopping Confluence log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
Neither of these should be happening: it means our shutdown sequence needs to be tidied up.
- is duplicated by
-
CONFSERVER-22697 'java.lang.IllegalStateException: The CacheManager has been shut down. It can no longer be used' on startup
- Closed
-
CONFSERVER-20632 CacheManager Critical Errors during Confluence Shutdown
- Closed
-
CONFSERVER-21530 Shutdown in Confluence 3.3+ causes CacheManager to throw Stacktrace
- Closed
- relates to
-
CONFSERVER-22879 Reduce errors logged when shutting down Confluence
- Gathering Interest