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.
(Global) : private Random random = new Random(); (in the method) : … newName += System.currentTimeMillis() + random.nextInt(); fileFolderService.move(nodeToMove, parentNodeRef, newName); …
(Global) : private Random random = new Random(); … public void executeImpl(Action action, NodeRef actionedUponNodeRef) { if (logger.isDebugEnabled()) { logger.debug("Action : OrganiseFileInDirectory"); } // Check that the node still exists if (this.nodeService.exists(actionedUponNodeRef) == true) { try { if (logger.isDebugEnabled()) { logger.debug("Begin"); } // Create tool to manage nodes NodeManager nodeManager = new NodeManager(nodeService, fileFolderService, mimetypeService, contentService); // Get the name of the node String nameDocument = nodeManager .getNameOfNodeRef(actionedUponNodeRef); // Directory to create String newRep = "newRep"; // Test that it is not newRep coming (the action is not generate by the creation of this directory) if (nameDocument.equals(newRep)){ return; } // Get infos on the present directory NodeRef parentNodeRef = nodeService.getPrimaryParent( actionedUponNodeRef).getParentRef(); // Creation of a directory NodeRef nodeNewRep = nodeService.getChildByName(parentNodeRef, ContentModel.ASSOC_CONTAINS, newRep); if (nodeNewRep == null) { // Create the newRep FileInfo fileInfo = fileFolderService.create(parentNodeRef, newRep, ContentModel.TYPE_FOLDER); nodeNewRep=fileInfo.getNodeRef(); } // Move the file in the directory nameDocument += System.currentTimeMillis() + random.nextInt(); fileFolderService.move(actionedUponNodeRef, nodeNewRep, nameDocument); } catch (Exception e) { if (logger.isDebugEnabled()) { logger.debug(e.getMessage()); logger.debug(e.toString()); } } if (logger.isDebugEnabled()) { logger.debug("End"); } } }
… // Move the file in the directory nameDocument += System.currentTimeMillis() + random.nextInt(); fileFolderService.move(actionedUponNodeRef, parentNodeRef, nameDocument);
… // Move the file in the directory nameDocument += System.currentTimeMillis() + random.nextInt(); fileFolderService.move(actionedUponNodeRef, parentNodeRef, nameDocument); fileFolderService.move(actionedUponNodeRef, nodeNewRep,null);
… fileFolderService.move(actionedUponNodeRef, parentNodeRef,nameDocument); fileFolderService.copy(actionedUponNodeRef, nodeNewRep,null);
Please correct the errors below then click OK. * A Space or File with that name already exists: pdfTemp1.pdf
11:17:49,272 User:xs ERROR [ui.common.Utils] A Space or File with that name already exists: pdfTemp1.pdf org.alfresco.service.cmr.model.FileExistsException: Existing file or folder pdfTemp1.pdf already exists at org.alfresco.repo.model.filefolder.FileFolderServiceImpl.moveOrCopy(FileFolderServiceImpl.java:701) at org.alfresco.repo.model.filefolder.FileFolderServiceImpl.rename(FileFolderServiceImpl.java:531) 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:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.alfresco.repo.model.filefolder.TempFileMarkerInterceptor.invoke(TempFileMarkerInterceptor.java:83) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:131) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.alfresco.repo.model.filefolder.MLTranslationInterceptor.invoke(MLTranslationInterceptor.java:211) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:308) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:236) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy63.rename(Unknown Source) at org.alfresco.web.bean.content.EditContentPropertiesDialog.finishImpl(EditContentPropertiesDialog.java:115) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:124) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:121) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326) at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:130) at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:534) 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:597) 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:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:110) at sun.reflect.GeneratedMethodAccessor766.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy195.doFilter(Unknown Source) at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:74) at sun.reflect.GeneratedMethodAccessor766.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy195.doFilter(Unknown Source) at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
3241 323.986259 200.200.200.CLIENT 200.200.200.SERVER SMB NT Create AndX Response, FID: 0x0000, Error: STATUS_OBJECT_NAME_COLLISION