AnsweredAssumed Answered

Could not find the root directory in repository

Question asked by prasal on Jun 27, 2017
Latest reply on Jul 5, 2017 by prasal

Hi,

   I am searching /Company Home root directory from the repository. I did the following way

CmisObject object = session.getObjectByPath(objectPath, OperationContext)

where objectPath is="/CompanyHome/Tests-folder"

but after executing above code got the following exception:

org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Object not found: /Company Home/Tests-folder
at org.alfresco.opencmis.AlfrescoCmisServiceImpl.getObjectByPath(AlfrescoCmisServiceImpl.java:2077)
at sun.reflect.GeneratedMethodAccessor572.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:79)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.opencmis.AlfrescoCmisStreamInterceptor.invoke(AlfrescoCmisStreamInterceptor.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.opencmis.AlfrescoCmisServiceInterceptor.invoke(AlfrescoCmisServiceInterceptor.java:101)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:83)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy328.getObjectByPath(Unknown Source)

 

 

I searched in the repository using node ref id like 

session.getObject("2dc70dba-1cd1-4b36-84ff-ee4f17e981cb").getName(); and it returns the "Company Home" directory name. I would like to know why it is not searching directory "Company Home" using session.getObjectByPath("/CompanyHome/Tests-folder") method?

Outcomes