0

我有一个基于 AEM 5.6.1 构建的包,并且我已经测试过它可以按预期工作。但是,当我尝试在 AEM 6 中部署它时,出现以下错误:

Caused by: javax.jcr.nodetype.ConstraintViolationException: Item is protected.
    at org.apache.jackrabbit.oak.jcr.session.ItemImpl$ItemWriteOperation.checkPreconditions(ItemImpl.java:99)
    at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:304)
    at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:113)
    at org.apache.jackrabbit.oak.jcr.session.NodeImpl.remove(NodeImpl.java:207)
    at org.apache.jackrabbit.vault.fs.impl.io.FolderArtifactHandler.accept(FolderArtifactHandler.java:112)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:880)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:758)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:795)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:795)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:795)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:795)
    at org.apache.jackrabbit.vault.fs.io.Importer.commit(Importer.java:795)

如何解决此错误?为了让我的包在 AEM 6 中工作,我应该开始查看哪些文件?

4

1 回答 1

0

确保每个文件夹都有一个 .content.xml 至少包含以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
    jcr:mixinTypes="[rep:AccessControllable]"
    jcr:primaryType="nt:folder"/>
于 2015-04-22T12:01:26.343 回答