As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var id = companyhome.id; // create directory and file var vdir = companyhome.createFolder("VersionedDirectory"); logger.log("vdir.addAspect successful: "+vdir.addAspect("cm:versionable")); var vfile = vdir.createFile("versionedFile.txt"); // * logger.log("vfile.addAspect successful: "+vfile.addAspect("cm:versionable")); // * // add version for file var chko = companyhome.createFolder("CheckoutPlace"); var workingCopy = vfile.checkout(chko); // * workingCopy.content = "Initial text."; // * vfile = workingCopy.checkin("initial version"); // * var workingCopy = vfile.checkout(chko); // * workingCopy.content = "Updated text"; // * vfile = workingCopy.checkin("update from initial version to 1"); // * // add version for dir var workingCopyOfVersionedDir = vdir.checkout(chko); vdir = workingCopyOfVersionedDir.checkin("a history note");
12:05:32,828 User:admin DEBUG [repo.jscript.ScriptLogger] vdir.addAspect successful: true 12:05:32,886 User:admin DEBUG [repo.jscript.ScriptLogger] vfile.addAspect successful: true 12:05:36,487 User:admin DEBUG [repo.jscript.RhinoScriptProcessor] Time to execute script: 3786ms 12:05:36,575 User:admin ERROR [ui.common.Utils] Failed to run Actions due to error: Failed to execute script 'workspace://SpacesStore/21482c05-6c7a-11dc-88d4-dfb6f8d77668': Failed to execute script 'workspace://SpacesStore/21482c05-6c7a-11dc-88d4-dfb6f8d77668': Wrapped org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: versionedFile.txt (AlfrescoScript#19) org.alfresco.service.cmr.repository.ScriptException: Failed to execute script 'workspace://SpacesStore/21482c05-6c7a-11dc-88d4-dfb6f8d77668': Failed to execute script 'workspace://SpacesStore/21482c05-6c7a-11dc-88d4-dfb6f8d77668': Wrapped org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: versionedFile.txt (AlfrescoScript#19) at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:172) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy49.executeScript(Unknown Source) at org.alfresco.repo.action.executer.ScriptActionExecuter.executeImpl(ScriptActionExecuter.java:157) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:120) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:537) at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:472) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:399) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:387) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:545) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy17.executeAction(Unknown Source) at org.alfresco.web.bean.actions.RunActionWizard.finishImpl(RunActionWizard.java:98) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:119) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:116) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:230) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:160) at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:125) at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:577) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61) at javax.faces.component.UICommand.broadcast(UICommand.java:109) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171) at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:613) Caused by: org.alfresco.service.cmr.repository.ScriptException: Failed to execute script 'workspace://SpacesStore/21482c05-6c7a-11dc-88d4-dfb6f8d77668': Wrapped org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: versionedFile.txt (AlfrescoScript#19) at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:145) at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:168) … 80 more Caused by: org.alfresco.error.AlfrescoRuntimeException: Wrapped org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: versionedFile.txt (AlfrescoScript#19) at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:517) at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:141) … 81 more Caused by: org.mozilla.javascript.WrappedException: Wrapped org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: versionedFile.txt (AlfrescoScript#19) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1757) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:170) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66) at org.mozilla.javascript.gen.c16._c0(AlfrescoScript:19) at org.mozilla.javascript.gen.c16.call(AlfrescoScript) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) at org.mozilla.javascript.gen.c16.call(AlfrescoScript) at org.mozilla.javascript.gen.c16.exec(AlfrescoScript) at org.mozilla.javascript.Context.evaluateString(Context.java:1196) at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509) … 82 more Caused by: org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: versionedFile.txt at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.setChildNameUnique(HibernateNodeDaoServiceImpl.java:774) at sun.reflect.GeneratedMethodAccessor442.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy1.setChildNameUnique(Unknown Source) at org.alfresco.repo.node.db.DbNodeServiceImpl.setChildUniqueName(DbNodeServiceImpl.java:2131) at org.alfresco.repo.node.db.DbNodeServiceImpl.addChild(DbNodeServiceImpl.java:825) at sun.reflect.GeneratedMethodAccessor560.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:138) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy2.addChild(Unknown Source) at sun.reflect.GeneratedMethodAccessor560.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221) at $Proxy3.addChild(Unknown Source) at sun.reflect.GeneratedMethodAccessor560.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:241) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:241) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:261) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:261) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy2.addChild(Unknown Source) at sun.reflect.GeneratedMethodAccessor560.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy2.addChild(Unknown Source) at org.alfresco.repo.copy.CopyServiceImpl.copyChildAssociations(CopyServiceImpl.java:855) at org.alfresco.repo.copy.CopyServiceImpl.copyAssociations(CopyServiceImpl.java:727) at org.alfresco.repo.copy.CopyServiceImpl.copy(CopyServiceImpl.java:899) at sun.reflect.GeneratedMethodAccessor1699.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy34.copy(Unknown Source) at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkin(CheckOutCheckInServiceImpl.java:366) at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkin(CheckOutCheckInServiceImpl.java:419) at sun.reflect.GeneratedMethodAccessor1697.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy81.checkin(Unknown Source) at org.alfresco.repo.jscript.ScriptNode.checkin(ScriptNode.java:1633) at org.alfresco.repo.jscript.ScriptNode.checkin(ScriptNode.java:1615) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) … 92 more