为了账号安全,请及时绑定邮箱和手机立即绑定

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 关注
  • 84 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信