AnsweredAssumed Answered

Unable to update the tag scopes 3.4.b

Question asked by loftux Moderator on Nov 19, 2010
Latest reply on Apr 5, 2011 by iblanco
I have an installation where TagScopes is somehow out of sync.
Especially serious is " SQL update 'alfresco.lock.update_Lock' affected 0 rows, not 1 as expected"
09:17:11,341 ERROR [org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl] Failed to execute asynchronous action: Action[ id=f45b5cec-4a9e-4922-aa29-1c171a09237a, node=null ]
java.lang.RuntimeException: Unable to update the tag scopes.
   at org.alfresco.repo.tagging.UpdateTagScopesActionExecuter.executeImpl(UpdateTagScopesActionExecuter.java:271)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:675)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:443)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:452)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:455)
   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)
Caused by: org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException: SQL update 'alfresco.lock.update_Lock' affected 0 rows, not 1 as expected
   at org.springframework.orm.ibatis.SqlMapClientTemplate.update(SqlMapClientTemplate.java:390)
   at org.alfresco.repo.domain.locks.ibatis.LockDAOImpl.updateLock(LockDAOImpl.java:144)
   at org.alfresco.repo.domain.locks.AbstractLockDAOImpl.getLock(AbstractLockDAOImpl.java:130)
   at org.alfresco.repo.lock.JobLockServiceImpl$4.execute(JobLockServiceImpl.java:423)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   at org.alfresco.repo.lock.JobLockServiceImpl.doWithRetry(JobLockServiceImpl.java:475)
   at org.alfresco.repo.lock.JobLockServiceImpl.getLockImpl(JobLockServiceImpl.java:429)
   at org.alfresco.repo.lock.JobLockServiceImpl.getLock(JobLockServiceImpl.java:192)
   at org.alfresco.repo.tagging.UpdateTagScopesActionExecuter.lockTagScope(UpdateTagScopesActionExecuter.java:520)
   at org.alfresco.repo.tagging.UpdateTagScopesActionExecuter.executeImpl(UpdateTagScopesActionExecuter.java:188)
   … 12 more
If have tried to do a refresh on each of the the tagscopes using a script that loops through folders and
//         if(n.hasAspect("cm:tagscope")){         
//            refresh.execute(n);
//            logger.warn("LX TagScope update: " +n.displayPath + "/" + n.name);
//         }
         if(n.isTagScope){
            var ts = n.getTagScope();
            ts.refresh();
            logger.warn("LX TagScope update: " +n.displayPath + "/" + n.name);
         }
I have tried the two methods above, and still no luck. What else can I try?
Mysql is version: mysql  Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64), can this be something specific to this version?
Also tried with a build from latest HEAD that has even more changes to how transactions are managed.

Outcomes