Internal server error while getting the document

cancel
Showing results for 
Search instead for 
Did you mean: 
azarfaiz
Member II

Internal server error while getting the document

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 1Smiley SadGiven the nodeRef of the document in Alfresco)

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


Method 2Smiley SadGiven 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.

3 Replies
afaust
Master

Re: Internal server error while getting the document

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...

azarfaiz
Member II

Re: Internal server error while getting the document

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)

afaust
Master

Re: Internal server error while getting the document

And what about the server logs? Can you capture a packet trace to get the full detail, not just the simple status message?