03-03-2017 04:55 AM
Hello all
I am trying to add a new version of image in alfresco repo with java bean.
My code is
versioning_service_port.checkOut(id_repository, id_holder, null, null);
versioning_service_port.checkIn(id_repository, id_holder, true, properties, stream, "update", null, null, null, null);
versioning_service_port.cancelCheckOut(id_repository, id_holder.value, null);
After calling my bean file updates and everything is ok, but I see an exception in my log (not alfresco logs)
(default task-42) Cannot create file "PTS" in the directory "workspace://SpacesStore/MYDIRECTORYHERE". Because of: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException fault code: 0 fault message: null
What does that means?
03-06-2017 04:00 AM
Allright, I foung my error.
I shouldn't call
versioning_service_port.cancelCheckOut(id_repository, id_holder.value, null);
after
versioning_service_port.checkIn(id_repository, id_holder, true, properties, stream, "update", null, null, null, null);
without cancelCheckout everything is ok and there are no errors in log.
03-05-2017 04:42 PM
What version of Alfresco? What is the service URL you are using? What version of OpenCMIS are you using?
Did you replace the node reference with "MYDIRECTORYHERE" in that log entry or did it literally say that?
03-06-2017 03:05 AM
Alfresco 5.1
Service URL http://localhost:8080/alfresco/cmisws/NavigationService
Unfortunately in my project I can't use OpenCmis, I just call services manually with their interfaces.
In node ref I replaced value of repositoryId in logs.
Actually service is availible and Id is correct, because I can create new version of document with my Java Bean, the problem is in this strange error with fault code=0 and fault message = null.
And I forgot to say that I have this error only when I am calling
versioning_service_port.checkIn
When I am doing only checkOut and cancelCheckOut logs are ok.
And when I create new Document (not new version) with
object_service_port.createDocument(id_repository, properties, id_folder, stream, org.oasis_open.docs.ns.cmis.core._200908.EnumVersioningState.MAJOR, null, null, null, null, id_holder);
logs are ok too.
Thank you.
03-06-2017 04:00 AM
Allright, I foung my error.
I shouldn't call
versioning_service_port.cancelCheckOut(id_repository, id_holder.value, null);
after
versioning_service_port.checkIn(id_repository, id_holder, true, properties, stream, "update", null, null, null, null);
without cancelCheckout everything is ok and there are no errors in log.
Explore our Alfresco products with the links below. Use labels to filter content by product module.