Trying to add or edit Project permissions for a group or user fails with the message "Could not find ACL".
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Summary
When a user tries to add or edit a permission at a Project level, the operation will fail and the following error will be displayed on screen:
Environment
- Bamboo, version 6.9 or later.
- Observed when having performed an upgrade from a version prior 6.9.
Diagnosis
When a user tries to add or edit a permission at a Project level, the operation will fail with a "Could not find ACL" error. In the server logs we'll see:
2021-07-07 15:14:22,879 ERROR [http-nio-8085-exec-61] [DefaultWebInterfaceManager] Could not evaluate condition 'com.atlassian.bamboo.plugins.web.conditions.HasPlansToCloneCondition@3d1b7d0a' for descriptor: bamboo.global.header:clone.plan (null)
com.google.common.util.concurrent.UncheckedExecutionException: org.acegisecurity.acls.NotFoundException: Could not find ACL for HibernateObjectIdentityImpl{Java Type=class com.atlassian.bamboo.project.ProjectPlanPermissions, Identifier=1234567}
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2050)
at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4964)
at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl$BambooCachingPermissionManager.readAclById(BambooCachingPermissionManagerFacadeImpl.java:47)
at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:431)
at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:409)
at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:113)
at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:103)
at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl.hasPermission(BambooCachingPermissionManagerFacadeImpl.java:87)
at com.atlassian.bamboo.plan.cache.CachedPlanManagerImpl.lambda$hasReadPermission$3(CachedPlanManagerImpl.java:247)
at java.util.function.Predicate.lambda$and$0(Predicate.java:69)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.concurrent.ConcurrentHashMap$KeySpliterator.tryAdvance(ConcurrentHashMap.java:3535)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:536)
at com.atlassian.bamboo.plan.cache.ImmutablePlanCacheServiceImpl.getAnyPlan(ImmutablePlanCacheServiceImpl.java:446)
(...)
Caused by: org.acegisecurity.acls.NotFoundException: Could not find ACL for HibernateObjectIdentityImpl{Java Type=class com.atlassian.bamboo.project.ProjectPlanPermissions, Identifier=1234567}
at com.atlassian.bamboo.security.acegi.acls.HibernateMutableAclServiceImpl.readAclById(HibernateMutableAclServiceImpl.java:82)
at com.atlassian.bamboo.security.acegi.acls.HibernateMutableAclServiceImpl.readAclById(HibernateMutableAclServiceImpl.java:73)
at sun.reflect.GeneratedMethodAccessor1099.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy119.readAclById(Unknown Source)
at com.atlassian.bamboo.security.BambooPermissionManagerImpl.readAclById(BambooPermissionManagerImpl.java:178)
at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl$BambooCachingPermissionManager.access$101(BambooCachingPermissionManagerFacadeImpl.java:37)
at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl$BambooCachingPermissionManager$1.load(BambooCachingPermissionManagerFacadeImpl.java:41)
at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl$BambooCachingPermissionManager$1.load(BambooCachingPermissionManagerFacadeImpl.java:38)
(...)
Cause
We have observed this error when there was a data corruption prior the upgrade (the reason for the corruption is unknown, but for the purpose of this article is not relevant) and after the upgrade, when trying to use these permissions the error will be triggered.
In order to verify if this is your case, you can run the following query:
SELECT * FROM ACL_OBJECT_IDENTITY
WHERE object_id_identity IN (
SELECT project_id
FROM PROJECT
WHERE project_id NOT IN (
SELECT object_id_identity
FROM ACL_OBJECT_IDENTITY
WHERE object_id_class = 'com.atlassian.bamboo.project.ProjectPlanPermissions'
)
);
- If the query returns empty, your DB does not have this corruption problem and this KB does not apply to you.
- If the query returns at least one entry, your DB does have this corruption problem and this KB applies to you.
Solution
Considering that you will need to directly modify data in the database to fix the problem, please Contact Atlassian Support for guidance on how to fix this, and mention this article for reference.