Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
OpenCMIS 0.11.0
-
Java
Description
First timer to JIRA here so please forgive any oversights on my part.
When getContentStream gets called, it passes a NULL value for the renditionFilter field on the URL which causes EMC's code to throw a NullPointerException. If an asterisk is passed instead, the EMC code returns URLs successfully and allows for successful retrieval of the content.
From AbstractAtomPubService.java:
public String loadLink(String repositoryId, String id, String rel, String type) {
String link = getLink(repositoryId, id, rel, type);
if (link == null)
return link;
}
The above code results in a URL that looks something like this and returns a 500 response:
One simple tweak and the GET results in a 200 response as expected:
The easy fix would be to change the call to getObjectInternal to:
getObjectInternal(repositoryId, IdentifierType.ID, id, ReturnVersion.THIS, null, null, null, "*", null, null, null);
Even better would be to retrieve the specified value for renditionFilter on the session context. However, BindingSession objects do not appear to share the OperationContext which is set on the SessionImpl object and which is used by the Session.getObject() call.
Attachments
Issue Links
- is depended upon by
-
CMIS-858 Unable to get rendition content - both getContentStream() and getRenditionDocument() return null
- Resolved