Jackrabbit nt:文件夹 nt:文件异常
我正在尝试将子节点添加到 nt:folder 节点(实际上是rep:AuthorizedFolder 节点,但其他节点类型也会出现同样的问题)。在下面的行中,文件夹节点在路径中显示为 USUARIO-1311259687502。
看到了您的示例和一些类似的示例,但以下行:
**Node fileNode = folderNode.addNode(file.getName(), "nt:file");**
抛出以下异常:
线程“main”javax.jcr.nodetype.ConstraintViolationException中的异常:在节点/rep:security中找不到lebAudio.mp3的子节点定义/rep:authorizeds/rep:users/USUARIO-1311259687502
尽管已经阅读了一些有关节点类型的文档(并了解nt:file 被允许作为 nt:folder 子项,并且两者都是 Jackrabbit 中的内置类型,因此不需要做任何特别的事情)我不明白出了什么问题。有什么想法吗?
预先感谢,祝您有美好的一天!
i am trying to add a child node to a nt:folder node (rep:AuthorizableFolder node actually, but the same problem arises with other node types). In the lines below the folder node appears in the path as USUARIO-1311259687502.
Saw your examples and some similar more, but the following line:
**Node fileNode = folderNode.addNode(file.getName(), "nt:file");**
throws the following exception:
Exception in thread "main" javax.jcr.nodetype.ConstraintViolationException: No child node definition for lebAudio.mp3 found in node /rep:security/rep:authorizables/rep:users/USUARIO-1311259687502
Despite of having read some docu about node types (and understanding that nt:file is allowed as nt:folder child, and both are built-in types in Jackrabbit, so nothing special should be done) i do not understand what is wrong. Any idea?
Thanks in advance, have a nice day!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
rep:AuthorizedFolder
不是nt:Folder
的子类型。它不允许您添加nt:File
节点。Jackrabbit 使用
/rep:security
下的所有内容来管理与安全相关的内容,例如用户、组和成员资格。您不应该改变那里的结构。rep:AuthorizableFolder
is not a sub type ofnt:Folder
. It does not allow you to addnt:File
nodes.Everything under
/rep:security
is used by Jackrabbit to manage security related things like user, groups and memberships. You should not alter the structures there.