05-27-2016 07:50 AM
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-api</artifactId>
<version>0.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-impl</artifactId>
<version>0.13.0</version>
</dependency>
Unexpected: current version does not appear to be 1st version in the list
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Unexpected: current version does not appear to be 1st version in the list
[workspace://version2Store/dfcb5494-1267-4131-b015-279644ad3938, versionStore://version2Store/61e2a602-0ecf-49c6-8241-cb4c42efb854]
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:506)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.delete(AbstractAtomPubService.java:701)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.deleteObject(ObjectServiceImpl.java:461)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.delete(SessionImpl.java:1353)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.delete(AbstractCmisObject.java:331)
try {
Document cmisDocument = (Document) cmisSession.getObject(document.getObjectId());
if (cmisDocument != null) {
versionLabel = cmisDocument.getVersionLabel();
boolean deleted = false;
List<Document> versions = cmisDocument.getAllVersions();
for(int j=0; j<versions.size() && !deleted; j++) {
Document version = versions.get(j);
if (versionLabel.equals(version.getVersionLabel())) {
version.delete(false);
deleted = true;
}
}
}
}
catch (Exception exc) {
message = "Error while deleting the document - " + exc.getMessage();
exc.printStackTrace();
}
05-31-2016 10:01 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.