Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
JCR Contentloader 2.0.6
-
None
Description
After building rev 892191, I loaded a bundle with a JSON descriptor file including access control initialization as described in SLING-981:
"security:acl" : [
{ "principal" : "everyone", "granted" : [ "jcr:removeChildNodes" ] }On bundle activation, an exception was thrown:
ERROR [SCR Component Actor] org.apache.sling.jcr.contentloader.internal.Loader Cannot load initial content for bundle org.sakaiproject.kernel.site : Unable to find an access conrol policy to update. javax.jcr.RepositoryException: Unable to find an access conrol policy to update.
at org.apache.sling.jcr.contentloader.internal.DefaultContentCreator.createAce(DefaultContentCreator.java:825)
at org.apache.sling.jcr.contentloader.internal.readers.JsonReader.createAce(JsonReader.java:425)
at org.apache.sling.jcr.contentloader.internal.readers.JsonReader.createAcl(JsonReader.java:391)
at org.apache.sling.jcr.contentloader.internal.readers.JsonReader.createNode(JsonReader.java:193)
at org.apache.sling.jcr.contentloader.internal.readers.JsonReader.parse(JsonReader.java:157)
at org.apache.sling.jcr.contentloader.internal.readers.JsonReader.parse(JsonReader.java:138)
at org.apache.sling.jcr.contentloader.internal.Loader.createNode(Loader.java:518)
This is caused by the same issue as SLING-1208. A change in the Jackrabbit 1.6 AccessControlManager means we need to try calling getPolicies as well as getApplicablePolicies.
I'll upload a patch.