AnsweredAssumed Answered

cmis and intenal error with exception 'java.lang.ClassCastException' due to  'getOutputStream'

Question asked by ciccione on Sep 1, 2014
Hello,
I'm Andrea, a new alfresco user.

I'm trying to do a bulk load of a small set of document.
Almost everything goes straight, until I started to use tags on my documents.
Every document with a tag or category (added through web interface), seems "unreachable" through the cmis api.

On the catalina side I see the exception:


2014-09-02 14:39:08,138  ERROR [impl.atompub.CmisAtomPubServlet] [http-bio-8080-exec-1771]
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException
(…)
Caused by: java.lang.ClassCastException
2014-09-02 14:17:59,699  ERROR [impl.atompub.CmisAtomPubServlet] [http-bio-8080-exec-1714] getOutputStream() has already been called for this response
java.lang.IllegalStateException: getOutputStream() has already been called for this response
(…)


and my python script (and chemistry workbench) show a "500 Internal Server Error"


this is the "offending" script in python

<python>
import cmis
from cmislib import CmisClient
from cmislib.exceptions import ObjectNotFoundException
from cmislib.exceptions import UpdateConflictException

client = CmisClient('http://172.16.37.185:8080/alfresco/api/-default-/cmis/versions/1.1/atom', 'admin', 'admin')
repo = client.defaultRepository
repo.getObjectByPath("/shared/misc/batch_import/file_with_tags.docx")
</python>

all my test where conducted with:
python 2.7.8
alfresco 4.2f
cmis 0.6dev (trunk version from svn, cloned 2014-09-01)


So, my question: there are any obvious error by my side?
anyone experienced the same behaviour?

how alfresco cmis extension play in this scenario?

Thank you

Outcomes