将包迁移到AEM 6. javax.jcr.nodetype.ConstraintViolationException:项目受保护

时间:2015-04-21 13:53:35

标签: osgi aem sling crx

我有一个基于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中运行?

1 个答案:

答案 0 :(得分: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"/>