03-13-2018 09:30 AM
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 1Given the nodeRef of the document in Alfresco)
String objectId = "f273be7c-9b70-44cf-880f-5945a7857b5d;1.0";
CmisObject cmisObject = cmisSession.getObject(objectId);
Method 2Given 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.
03-16-2018 08:57 AM
Please provide more info on your exception. Log output of alfresco.log or a stack trace is typically recommended to ensure it is even remotely possible to answer your question...
03-16-2018 09:59 AM
Hi Axel Faust
Following is the stack trace of the error that I face
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.read(AbstractAtomPubService.java:613)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:836)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObject(ObjectServiceImpl.java:619)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:410)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:388)
at com.test.cms.alfresco.ejb.AlfrescoIntegrationManagerBean.openAlfrescoDocument(AlfrescoIntegrationManagerBean.java:566)
03-16-2018 03:38 PM
And what about the server logs? Can you capture a packet trace to get the full detail, not just the simple status message?
Explore our Alfresco products with the links below. Use labels to filter content by product module.