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.
UserTransaction trx_A = serviceRegistry.getTransactionService() .getUserTransaction(); try { trx_A.begin() nodeService.createNode(…); nodeService.createNode(…); trx_A.commit(); } catch(Throwable e) { try { if (trx_A.getStatus() == Status.STATUS_ACTIVE) { trx_A.rollback(); } } catch(Throwable ee) { // Handle double exception in whatever way is appropriate eg. log it } throw e; } …. UserTransaction trx_B = serviceRegistry.getTransactionService() .getUserTransaction(); try { trx_B.begin() nodeService.createNode(…); nodeService.createNode(…); trx_B.commit(); } catch(Throwable e) { try { if (trx_B.getStatus() == Status.STATUS_ACTIVE) { trx_B.rollback(); } } catch(Throwable ee) { // Handle double exception in whatever way is appropriate eg. log it } throw e; }
11:08:14,080 ERROR [ch.custom.manageoffice.actions.SplittPDFFromERP] Error during the transaction javax.transaction.RollbackException: The transaction has already been marked for rollback at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:450) at ch.custom.manageoffice.actions.SplittPDFFromERP.createErrorFile(SplittPDFFromERP.java:271) at ch.custom.manageoffice.actions.SplittPDFFromERP.executeImpl(SplittPDFFromERP.java:229) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:592) at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:72) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:592) at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:529) at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:369) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227) at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:378) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437) at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:381) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
Boolean result = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>(){ public Boolean execute() throws Throwable { //your code should be right here dropped return true; } });
Boolean result = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>(){ public Boolean execute() throws Throwable { … if(val == null) throw new IllegalStateException("Val must not be null"); return true; } });
final String var = …; boolean resultAddFiles = transactionService.getRetryingTransactionHelper() .doInTransaction( new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>() { public Boolean execute() throws Throwable { boolean success= method(var); if (!success){ // Retry and rollback if always problem throw new IllegalStateException("Problem during moveFilesAndAddMeta"); } return true; } });
Boolean result = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>(){ public Boolean execute() throws Throwable { … if(val == null) throw new IllegalStateException("Val must not be null"); return true; } //we need to setup a new transaction for this }, false, true);
Boolean result = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>(){ public Boolean execute() throws Throwable { … if(val == null) throw new java.sql.SQLException("Val must not be null"); return true; } //we need to setup a new transaction for this }, false, true);
… final int firmNbF=33; final NodeRef actionedUponNodeRefF = actionedUponNodeRef; boolean success = transactionService .getRetryingTransactionHelper() .doInTransaction( new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>() { public Boolean execute() throws Throwable { // Change property nodeService.setProperty( actionedUponNodeRefF, QNAME_SC_FIRMNB, firmNbF); return true; } }, false, true); } catch (Exception e) { logger.error(e); }
Le contenu de l'élément est manquant : élément : workspace://SpacesStore/0d213852-7fc6-4392-a733-ab5216a5746b lecteur : null Veuillez contacter votre administrateur système.
org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/3ce67710-4e6c-4f36-8401-87b0496812fa
… logger.debug("A : " + nodeService.getProperty(actionedUponNodeRef,ContentModel.PROP_NAME)); final NodeRef actionedUponNodeRefF = actionedUponNodeRef; final NodeManager nodeManagerF = nodeManager; final Action actionF = action; logger.debug("B : "+ nodeService.getProperty(actionedUponNodeRefF,ContentModel.PROP_NAME)); try { success = transactionService.getRetryingTransactionHelper().doInTransaction( new RetryingTransactionHelper.RetryingTransactionCallback<Boolean>() { public Boolean execute() throws Throwable { try{ logger.debug("C : "+ nodeService.getProperty(actionedUponNodeRefF,ContentModel.PROP_NAME)); }catch (Exception e){ logger.error(e); e.printStackTrace(); } … }, false, true);
A : nameFile B : nameFile C : nameFile
A : nameFile B : nameFile org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/35cf425e-e8db-4664-904a-8a38bc2a44a4 org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/35cf425e-e8db-4664-904a-8a38bc2a44a4 at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:156) at org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect(DbNodeServiceImpl.java:712) at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source) 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:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invokeInternal(SingleEntryTransactionResourceInterceptor.java:163) at org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invoke(SingleEntryTransactionResourceInterceptor.java:138) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.hasAspect(Unknown Source) at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source) 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:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.hasAspect(Unknown Source) at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221) at $Proxy8.hasAspect(Unknown Source) at org.alfresco.repo.node.MLPropertyInterceptor.getPivotNodeRef(MLPropertyInterceptor.java:320) at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:164) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:203) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:203) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.getProperty(Unknown Source) at ch.custom.manageoffice.actions.OrganizeFileInDirectory$1.execute(OrganizeFileInDirectory.java:170) at ch.custom.manageoffice.actions.OrganizeFileInDirectory$1.execute(OrganizeFileInDirectory.java:1) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320) at ch.custom.manageoffice.actions.OrganizeFileInDirectory.executeImpl(OrganizeFileInDirectory.java:165) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:592) at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:72) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:592) at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:529) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:391) 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:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy22.executeAction(Unknown Source) at org.alfresco.repo.rule.RuleServiceImpl.executeRule(RuleServiceImpl.java:928) at org.alfresco.repo.rule.RuleServiceImpl.executePendingRule(RuleServiceImpl.java:896) at org.alfresco.repo.rule.RuleServiceImpl.executePendingRulesImpl(RuleServiceImpl.java:867) at org.alfresco.repo.rule.RuleServiceImpl.executePendingRules(RuleServiceImpl.java:840) at org.alfresco.repo.rule.RuleTransactionListener.beforeCommit(RuleTransactionListener.java:63) at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:710) at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:690) at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:650) at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:835) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:645) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314) at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:466) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:334) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227) at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:127) 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:81) 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)