com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix

Atlassian JIRA | Oswaldo Hernandez [Atlassian] Bugmaster | 5 years ago
  1. 0

    h3. Summary If the plugin system gets an exception while trying to delete the Felix OSGI cache, JIRA gets locked and is unusable: h3. Steps to Reproduce # Start up JIRA. # Stop it. # Change the permissions on the {{$JIRA_HOME\plugins\.osgi-plugins}} directory such that the user JIRA runs as is unable to read them (or do something else to mess with the directory so it throws an exception on startup). # Start JIRA. h3. Expected Results JIRA is able to clear out the directory and start up. h3. Actual Results JIRA will throw an exception on startup and fails to start: {noformat} 2012-02-03 13:48:59,029 main FATAL [atlassian.jira.upgrade.PluginSystemLauncher] A fatal error occured during initialisation. JIRA has been locked. com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37) at com.atlassian.jira.plugin.PluginPath$JiraHomeAdapter.<init>(PluginPath.java:71) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(.osgi-pluginsNative Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:100) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298) at com.atlassian.jira.ComponentManager.getComponent(ComponentManager.java:534) at com.atlassian.jira.ComponentManager.getComponentInstanceOfType(ComponentManager.java:500) at com.atlassian.jira.ComponentManager$PluginSystem.getPluginSystemLifecycle(ComponentManager.java:660) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:670) at com.atlassian.jira.ComponentManager.startPluginSystem(ComponentManager.java:242) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:235) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:220) at com.atlassian.jira.upgrade.PluginSystemLauncher.start(PluginSystemLauncher.java:23) at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:101) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:250) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:149) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:94) at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:24) at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:61) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:56) at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:68) at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:63) at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121) at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165) at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134) at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:96) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.io.IOException: Unable to delete directory C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix\felix-cache\bundle48\version0.0\bundle.jar-embedded\META-INF. at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:981) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:87) ... 76 more {noformat} h3. Workaround Our [JIRA Does Not Start Due to 'Unable to clean the cache directory'|https://confluence.atlassian.com/pages/viewpage.action?pageId=223219163] KB instructs how to fix this.

    Atlassian JIRA | 5 years ago | Oswaldo Hernandez [Atlassian] Bugmaster
    com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix
  2. 0

    h3. Summary If the plugin system gets an exception while trying to delete the Felix OSGI cache, JIRA gets locked and is unusable: h3. Steps to Reproduce # Start up JIRA. # Stop it. # Change the permissions on the {{$JIRA_HOME\plugins\.osgi-plugins}} directory such that the user JIRA runs as is unable to read them (or do something else to mess with the directory so it throws an exception on startup). # Start JIRA. h3. Expected Results JIRA is able to clear out the directory and start up. h3. Actual Results JIRA will throw an exception on startup and fails to start: {noformat} 2012-02-03 13:48:59,029 main FATAL [atlassian.jira.upgrade.PluginSystemLauncher] A fatal error occured during initialisation. JIRA has been locked. com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37) at com.atlassian.jira.plugin.PluginPath$JiraHomeAdapter.<init>(PluginPath.java:71) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(.osgi-pluginsNative Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:100) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298) at com.atlassian.jira.ComponentManager.getComponent(ComponentManager.java:534) at com.atlassian.jira.ComponentManager.getComponentInstanceOfType(ComponentManager.java:500) at com.atlassian.jira.ComponentManager$PluginSystem.getPluginSystemLifecycle(ComponentManager.java:660) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:670) at com.atlassian.jira.ComponentManager.startPluginSystem(ComponentManager.java:242) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:235) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:220) at com.atlassian.jira.upgrade.PluginSystemLauncher.start(PluginSystemLauncher.java:23) at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:101) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:250) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:149) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:94) at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:24) at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:61) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:56) at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:68) at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:63) at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121) at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165) at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134) at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:96) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.io.IOException: Unable to delete directory C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix\felix-cache\bundle48\version0.0\bundle.jar-embedded\META-INF. at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:981) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:87) ... 76 more {noformat} h3. Workaround Our [JIRA Does Not Start Due to 'Unable to clean the cache directory'|https://confluence.atlassian.com/pages/viewpage.action?pageId=223219163] KB instructs how to fix this.

    Atlassian JIRA | 5 years ago | Oswaldo Hernandez [Atlassian] Bugmaster
    com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix
  3. 0

    An intermittent failure to delete the osgi cache directory during initial data can fail in a way that renders JIRA inaccessible: {noformat} 2011-08-30 20:16:11,427 main ERROR [jira.studio.startup.JiraInitialData] Error doing studio specific setup com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37) at com.atlassian.jira.plugin.PluginPath$JiraHomeAdapter.<init>(PluginPath.java:71) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.picocontainer.defaults.InstantiatingComponentAdapter.]. newInstance(InstantiatingComponentAdapter.java:100) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298) at com.atlassian.jira.ComponentManager.getComponent(ComponentManager.java:542) at com.atlassian.jira.ComponentManager.getComponentInstanceOfType(ComponentManager.java:501) at com.atlassian.jira.ComponentManager$PluginSystem.getPluginSystemLifecycle(ComponentManager.java:668) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:678) at com.atlassian.jira.ComponentManager.startPluginSystem(ComponentManager.java:243) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:236) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:221) at com.atlassian.jira.ManagerFactory.globalRefresh(ManagerFactory.java:179) at com.atlassian.jira.util.system.JiraSystemRestarterImpl.restartPico(JiraSystemRestarterImpl.java:55) at com.atlassian.jira.util.system.JiraSystemRestarterImpl.ariseSirJIRA(JiraSystemRestarterImpl.java:29) at com.atlassian.jira.studio.startup.JiraInitialData.restartJira(JiraInitialData.java:202) at com.atlassian.jira.studio.startup.JiraInitialData.start(JiraInitialData.java:83) at com.atlassian.jira.studio.startup.StartupHooks.afterJiraStart(StartupHooks.java:63) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:99) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.io.FileNotFoundException: File does not exist: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix/felix-cache/bundle82/bundle.state at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1386) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:87) ... 64 more {noformat} See also [JSTDEV-226|https://sdog.jira.com/browse/JSTDEV-226]: failure to delete the cache directory has been seen in other apps without noticeable consequences. The fact that the plugin system should not fail when attempting to delete a missing file has been acknowledged in PLUG-796. However, we need to understand why this is happening in JIRA. From [~fakraemer]: bq. We restart JIRA there, so my first thought that it might be a problem with an old plugin system instance working on the same directory, but I wouldn't completely leave out the possibility that this might be another NFS issue related to [HPT-619|https://extranet.atlassian.com/jira/browse/HPT-619].

    Atlassian JIRA | 5 years ago | Robin Fernandes [Atlassian]
    com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    An intermittent failure to delete the osgi cache directory during initial data can fail in a way that renders JIRA inaccessible: {noformat} 2011-08-30 20:16:11,427 main ERROR [jira.studio.startup.JiraInitialData] Error doing studio specific setup com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37) at com.atlassian.jira.plugin.PluginPath$JiraHomeAdapter.<init>(PluginPath.java:71) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.picocontainer.defaults.InstantiatingComponentAdapter.]. newInstance(InstantiatingComponentAdapter.java:100) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45) at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298) at com.atlassian.jira.ComponentManager.getComponent(ComponentManager.java:542) at com.atlassian.jira.ComponentManager.getComponentInstanceOfType(ComponentManager.java:501) at com.atlassian.jira.ComponentManager$PluginSystem.getPluginSystemLifecycle(ComponentManager.java:668) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:678) at com.atlassian.jira.ComponentManager.startPluginSystem(ComponentManager.java:243) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:236) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:221) at com.atlassian.jira.ManagerFactory.globalRefresh(ManagerFactory.java:179) at com.atlassian.jira.util.system.JiraSystemRestarterImpl.restartPico(JiraSystemRestarterImpl.java:55) at com.atlassian.jira.util.system.JiraSystemRestarterImpl.ariseSirJIRA(JiraSystemRestarterImpl.java:29) at com.atlassian.jira.studio.startup.JiraInitialData.restartJira(JiraInitialData.java:202) at com.atlassian.jira.studio.startup.JiraInitialData.start(JiraInitialData.java:83) at com.atlassian.jira.studio.startup.StartupHooks.afterJiraStart(StartupHooks.java:63) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:99) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.io.FileNotFoundException: File does not exist: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix/felix-cache/bundle82/bundle.state at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1386) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044) at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:87) ... 64 more {noformat} See also [JSTDEV-226|https://sdog.jira.com/browse/JSTDEV-226]: failure to delete the cache directory has been seen in other apps without noticeable consequences. The fact that the plugin system should not fail when attempting to delete a missing file has been acknowledged in PLUG-796. However, we need to understand why this is happening in JIRA. From [~fakraemer]: bq. We restart JIRA there, so my first thought that it might be a problem with an old plugin system instance working on the same directory, but I wouldn't completely leave out the possibility that this might be another NFS issue related to [HPT-619|https://extranet.atlassian.com/jira/browse/HPT-619].

    Atlassian JIRA | 5 years ago | Robin Fernandes [back 5th Oct]
    com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix
  6. 0

    GitHub comment 2#240115941

    GitHub | 4 months ago | leetal
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'refreshableServerContext': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'felixPluginManager' defined in URL [jar:file:/var/lib/tomcat7/webapps/lexevs/WEB-INF/lib/cts2-core-1.2.0.FINAL.jar!/edu/mayo/cts2/framework/core/plugin/FelixPluginManager.class]: Invocation of init method failed; nested exception is com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to start OSGi container

    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. com.atlassian.plugin.osgi.container.OsgiContainerException

      Unable to clean the cache directory: C:\Program Files\Atlassian\Application Data\JIRA\plugins\.osgi-plugins\felix

      at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate()
    2. com.atlassian.plugin
      DefaultOsgiPersistentCache.<init>
      1. com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91)
      2. com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37)
      2 frames
    3. com.atlassian.jira
      PluginPath$JiraHomeAdapter.<init>
      1. com.atlassian.jira.plugin.PluginPath$JiraHomeAdapter.<init>(PluginPath.java:71)
      1 frame