无法在露天找到根目录(公司主页)

Could not able to find root directory (Company Home) in alfresco

我正在从存储库中搜索“/Company Home”根目录。我做了以下方式 CmisObject 对象 = session.getObjectByPath(objectPath, OperationContext) 其中 objectPath 为 ="/Company Home/Tests-folder" 但是在执行上面的代码后出现了以下异常:

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.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)

我使用节点 UUID 在存储库中搜索,例如 session.getObject("2dc70dba-1cd1-4b36-84ff-ee4f17e981cb").getName();它 returns "Company Home" 目录名称。我想知道为什么它不使用搜索目录 "Company Home" session.getObjectByPath("/公司Home/Tests-folder") 方法? 但是我可以访问“/测试文件夹”。

公司主页是您存储库的根目录。因此,如果 Tests-folder 位于根目录中,则使用 getObjectByPath 的正确方法是 session.getObjectByPath("/Tests-folder").