06-27-2017 03:30 AM
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?
06-28-2017 04:22 AM
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.
06-28-2017 05:02 AM
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.
07-05-2017 09:42 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.