Hi,I am trying to programmatically add and checkout/checkin documents against Alfresco 4.2f using Apache Chemistry v11.0 (atompub binding). Frequently I get the following exception from the server while performing a checkin:
org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException: Expected 654502 bytes but retrieved 0 bytes!
at org.alfresco.opencmis.AlfrescoCmisServiceImpl.copyToTempFile(AlfrescoCmisServiceImpl.java:2812)
at org.alfresco.opencmis.AlfrescoCmisServiceImpl.checkIn(AlfrescoCmisServiceImpl.java:2029)
If the checkin fails the document remains checkout out, so I then try to delete the document like so (the document here is the object returned from the original createDocument() call):
if (document.isVersionSeriesCheckedOut()) {
LOG.info("Cancelling checkout of document with id {}.", document.getId());
document.cancelCheckOut();
}
document.delete();
However, the check to see if it's checked out returns false, and it tries to delete it anyway, resulting in another exception:org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException: Could not delete/cancel checkout on the original checked out documentAm I doing anything obviously wrong?Thanks,