本文介绍了MarkLogic 10-托管文档在dls上引发异常:document-checkout-update-checkin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经管理了名为123456.xml的文档,并且尝试使用如下的dls库函数对其进行更新,

I have managed document named 123456.xml and I am trying to update it with dls library function as below,

declare variable $uri:= "/abc/123456_xml_versions/1-123456.xml";

dls:document-is-managed($uri),
dls:document-checkout-update-checkin($uri, $xml, 'Update', fn:true())

上面的脚本片段被抛出以下异常,

Above script snip is throwing below exception,

[1.0-ml] DLS-DOCUMENTVERSION:(err:FOER0000)无法更新或签出文档版本/abc/123456_xml_versions/1-123456.xml

[1.0-ml] DLS-DOCUMENTVERSION: (err:FOER0000) Cannot update or checkout document version /abc/123456_xml_versions/1-123456.xml

这是应用程序的现有迁移操作,正在更新文档的所有版本.

This is an existing migration operation of the application which is updating all versions of the document.

推荐答案

不要提供versions目录中的DLS函数URI.这些URI由DLS管理.只需为其提供要更新的文档的规范URI,DLS就会自动为您增加版本:

Don't give DLS functions URIs from the versions directory. Those URIs are managed by DLS. Just give it the canonical URI of the document you want to update, and DLS will automatically increment the version for you:

declare variable $uri:= "/abc/123456/123456.xml";
...

这篇关于MarkLogic 10-托管文档在dls上引发异常:document-checkout-update-checkin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 08:24