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?
You are looking for "CompanyHome" yet he folder name is "Company Home". If you have not noticed it, these names do not match. One has a whitespace, the other doesn't.
Hi Axel thanks for reply.
I am looking for the "Company Home" not "CompanyHome". Sorry it was my typing mistake.
I am passing "/Company Home/Tests-folder" as a parameter to the function. Their is a space between Company and Home string.
It is a ("Company Home") default directory which I am looking for in repository.
Is their any changes in Alfresco 5.1 version that I am not getting the cmis object for "/Company Home" directory.
But I am able to see "/Company Home" directory on Client UI side and also while iterating the "/" I am not able to see "Company Home" directory but can see the child directory of "Company Home".
Please let me know why this happened in this version.
Thanks.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.