AnsweredAssumed Answered

Internal server error while getting the document

Question asked by azarfaiz on Mar 13, 2018
Latest reply on Mar 16, 2018 by afaust

Hi


I am in need of getting the stream of the document present in Alfresco. As a first step I tried retrieving the document object using the below methods

 

Method 1:(Given the nodeRef of the document in Alfresco)

 

String objectId = "f273be7c-9b70-44cf-880f-5945a7857b5d;1.0";
CmisObject cmisObject = cmisSession.getObject(objectId);

 


Method 2:(Given the path of the document)

 

String objectPath = "/Sites/testSite/documentLibrary/testFolder1/testFolder2/testDocument.pdf";
CmisObject cmisObject = cmisSession.getObjectByPath(objectPath);

 

Unfortunately both the methods are throwing me a CMIS runtime exception(org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error).

 

However I am able to call other methods of cmis session such as getRepositoryInfo(),getRootFolder() which means there is no problem in cmis session creation.

 

Any help appreciated.

Outcomes