AnsweredAssumed Answered

Unauthorized when using multi thread

Question asked by phong_van on Jun 29, 2017

Dear everyone,

I'm using multi thread for create document on Alfresco (via CMIS API). When running application some thread throw exception 

 

2017-06-29 12:05:54 ERROR ThreadPool:134 - Unauthorized
org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException: Unauthorized
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:492)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:701)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:933)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObjectByPath(ObjectServiceImpl.java:655)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:567)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:548)
at com.mcredit.alfresco.cmisapi.CmisMigrateAPI.createFolder(CmisMigrateAPI.java:57)
at com.mcredit.alfresco.cmisapi.CmisMigrateAPI.doMigrateOnECM(CmisMigrateAPI.java:41)
at com.mcredit.alfresco.multithread.ThreadUnit.run(ThreadUnit.java:34)
at com.mcredit.alfresco.multithread.ThreadPool$PooledThread.run(ThreadPool.java:131)

 

So problem is resolved when using single thread. 

 

Anyone can help?

Outcomes