Bitbucket Server Upgrade Fails with (Permission denied) Exception

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When upgrading Bitbucket Server, the following exception is reported in the log files:

1 2 2012-10-19 14:31:34,355 ERROR [main] o.s.web.context.ContextLoader Context initialization failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.transaction.PlatformTransactionManager]: : Error creating bean with name 'pluginConfiguration' defined in class path resource [bitbucket-context.xml]: Cannot resolve reference to bean 'pluginPersistentStateStore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginPersistentStateStore' defined in class path resource [bitbucket-context.xml]: Cannot create inner bean 'com.atlassian.bitbucket.internal.plugin.DefaultPluginPersistentStateStore#85e57' of type [com.atlassian.bitbucket.internal.plugin.DefaultPluginPersistentStateStore] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.bitbucket.internal.plugin.DefaultPluginPersistentStateStore#85e57' defined in class path resource [bitbucket-context.xml]: Cannot resolve reference to bean 'pluginStateDao' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginStateDao' defined in URL [jar:file:/opt/atlassian/bitbucket/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-1.3.0.jar!/com.atlassian.bitbucket/internal/plugin/HibernatePluginStateDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'ehcache' defined in class path resource [bitbucket-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: java.io.FileNotFoundException: /opt/atlassian/bitbucket/temp/rescopeActivityDetails.data (Permission denied)

Cause

The user running the Bitbucket Server process does not have read/write/execute permissions on the temp folder in the<Bitbucket Server installation directory>.

Resolution

Ensure the user has sufficient permissions on the above folder and restart the application.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.