Java Cmis方法getAllVersions:CmisNotSupportedException异常:存储库不支持此对象的操作
我当然对此感到绝望,我希望有人知道我的CMIS服务器实现中缺少了什么,或者服务器端出了什么问题 我已经使用Apache chemistry opencmis实现了我的Cmis服务器,以下是pom中的依赖项:Java Cmis方法getAllVersions:CmisNotSupportedException异常:存储库不支持此对象的操作,java,cmis,opencmis,Java,Cmis,Opencmis,我当然对此感到绝望,我希望有人知道我的CMIS服务器实现中缺少了什么,或者服务器端出了什么问题 我已经使用Apache chemistry opencmis实现了我的Cmis服务器,以下是pom中的依赖项: <dependency> <groupId>org.apache.chemistry.opencmis</groupId> <artifactId>chemistry-opencmis-server-support<
<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>
获取提到的异常。
关于文档类型定义impl我已将isversionable设置为true:
CMIS工作台:
使用上述测试调试客户端时,问题是从未到达服务器方法getAllVersions之前抛出上述异常的客户端,它尝试使用此键从其链接缓存(它是一个映射)中获取此链接,但是这个键不在他们的链接缓存中,这是我指的类
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);
}
服务器不提供指向
版本
资源的链接,尽管文档标记为可版本化
在
ObjectInfo
对象中设置版本系列ID。这将添加缺少的链接。尽管文档标记为可版本,但服务器不提供指向版本的链接
在ObjectInfo
对象中设置版本系列ID。这将添加缺少的链接。您是否提供了正确的对象id?您是否提供了正确的对象id?
@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);
}
org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException: Operation not supported by the repository for this object!
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.throwLinkException(AbstractAtomPubService.java:294)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.VersioningServiceImpl.getAllVersions(VersioningServiceImpl.java:276)
at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getAllVersions(DocumentImpl.java:385)
at org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest.checkVersionHistory(AbstractSessionTest.java:1813)
at org.apache.chemistry.opencmis.workbench.checks.ObjectComplianceCheck.run(ObjectComplianceCheck.java:55)
at org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest.run(AbstractSessionTest.java:181)
at org.apache.chemistry.opencmis.tck.impl.AbstractCmisTestGroup.run(AbstractCmisTestGroup.java:115)
at org.apache.chemistry.opencmis.workbench.details.ObjectPanel$3.actionPerformed(ObjectPanel.java:346)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception: Operation not supported by the repository for this object!