亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Cmis 方法 getAllVersions 異常:CmisNotSupported

Cmis 方法 getAllVersions 異常:CmisNotSupported

MMTTMM 2023-05-17 16:41:36
我當然對此感到絕望,我希望有人知道我的 CMIS 服務器實現中缺少什么,或者服務器端出了什么問題。我已經使用 Apache chemistry-opencmis 實現了我的 Cmis 服務器,這些是 pom 中的依賴項:<dependency>? ? ? <groupId>org.apache.chemistry.opencmis</groupId>? ? ? <artifactId>chemistry-opencmis-server-support</artifactId>? ? ? <version>1.1.0</version>? ? </dependency>? ? <dependency>? ? ? <groupId>org.apache.chemistry.opencmis</groupId>? ? ? <artifactId>chemistry-opencmis-server-bindings</artifactId>? ? ? <version>1.1.0</version>? ? ? <exclusions>? ? ? ? <exclusion> <!-- Due to GWT compiler error -->? ? ? ? ? <groupId>asm</groupId>? ? ? ? ? <artifactId>asm</artifactId>? ? ? ? </exclusion>? ? ? </exclusions>?</dependency>當我嘗試從客戶端調用getAllVersions方法(我已經在服務器端實現)時,一切似乎都不太奏效,得到這個異常: CmisNotSupportedException:該對象的存儲庫不支持操作!我使用以下代碼對其進行了測試,針對現有文檔:Session session = getSession();Document doc = (Document) session.getObject("dddfd49f-ab13-435d-b65c-7e18d3bfbed3");doc.getAllVersions();得到提到的異常。使用提到的測試調試客戶端,問題是永遠不會到達服務器方法getAllVersions之前拋出客戶端提到的異常,它試圖獲取此鏈接http://localhost:8081/cmis/atom/default/versions?id =dddfd49f-ab13-435d-b65c-7e18d3bfbed3從它的鏈接緩存(它是一個地圖)中使用這個密鑰版本歷史,但是這個密鑰不在他們的鏈接緩存中,這是我指的類org.apache.chemistry.opencmis.client.bindings.spi.atompub.VersioningServiceImpl這只是代碼:@Override? ? public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,? ? ? ? ? ? Boolean includeAllowableActions, ExtensionsData extension) {? ? ? ? List<ObjectData> result = new ArrayList<ObjectData>();? ? ? ? // find the link? ? ? ? String link = loadLink(repositoryId, objectId, Constants.REL_VERSIONHISTORY, Constants.MEDIATYPE_FEED);? ? ? ? if (link == null) {? ? ? ? ? ? throwLinkException(repositoryId, objectId, Constants.REL_VERSIONHISTORY, Constants.MEDIATYPE_FEED);? ? ? ? }方法loadLink返回 null,因此它啟動上述異常,因為他沒有找到上述鏈接。
查看完整描述

1 回答

?
慕田峪7331174

TA貢獻1828條經驗 獲得超13個贊

versions盡管文檔被標記為可版本化,但服務器不提供指向資源的鏈接。

在對象中設置版本系列 ID ObjectInfo。那應該添加缺失的鏈接。


查看完整回答
反對 回復 2023-05-17
  • 1 回答
  • 0 關注
  • 225 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號