Apache Jackrabbit "web repository browser" 不显示导入的文件

Apache Jackrabbit "web repository browser" do not show imported files

我正在使用 Apache Jackrabbit 使用 JCR API。我已将当前存储库导出到 XML 文件:

session.exportSystemView("/", out, false, false);

然后,我将生成的 XML 文件导入 Jackrabbit 的新实例:

session.importXML("/", in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

现在我可以使用 JCR API 在新的 Jackrabbit 服务器上读取和查询导入的文件。但是,我在以下地址(根为空)中的标准 WebDAV 存储库浏览器中看不到导入的文件:

http://localhost:8080/repository/default/

那么问题出在哪里?

我找到了答案,根据Alexander Answer

Note that this approach has one drawback: it is currently not possible to re-import a full export, ie. from the root node and including the jcr:system subnode that contains the version storage, since the jcr:system part and especially the version storage are not writeable (this is mainly because JCR does not specify how to import versions)

在JCR中我们不能重新导入整个备份(包括根节点),所以最好在所有文件上添加一个父节点(例如/docs),然后我们可以导出并重新导入父节点节点.