AnsweredAssumed Answered

Copy throwing CmisRuntimeException

Question asked by nisaxena on Dec 30, 2014
I am using Alfresco 4.2.f and OpenCMIS 0.10.0. I am using document.copy API to copy the document from one site to another with following code:

public void copyDocument(Document document) {
    String destinationFolderName = "readonly";
    Folder destinationFolder = getFolder(destinationFolderName);
    document.copy(destinationFolder);
}

In the debugger following are the values:

document : CMIS_DOCUMENT (cmis:document): workspace://SpacesStore/74d0c9fc-802c-4dcc-9b3c-3a14fa09e6b4
destinationFolder: CMIS_FOLDER (cmis:folder): workspace://SpacesStore/d7d56162-bf09-4f1d-b35c-de638a165276

Means it is not null. I am using admin account to copy it. But I am getting following exception on this:

org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:487)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:629)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.createDocument(ObjectServiceImpl.java:119)
   at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:751)
   at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.copyViaClient(DocumentImpl.java:207)
   at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.copy(DocumentImpl.java:155)
   at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.copy(DocumentImpl.java:172)

Please suggest.

Thanks,
Nitin



Outcomes