cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled Action Configuration - Transaction Mode

agey
Champ in-the-making
Champ in-the-making
Hi all,

I use Alfresco 3.0 and I have configured a scheduled action to transform documents tiff to pdf using Intelliant OCR. The problem is sometimes the Intelliant OCR can´t transform a document but it doesn´t return error. It stops and doesn´t continue processing the remaining files.

The configuration of scheduled actions is as follows:


<bean id="programTransformOCR" class="org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinition">
        <property name="transactionMode">
            <value>ISOLATED_TRANSACTIONS</value>
        </property>
        <property name="compensatingActionMode">
            <value>IGNORE</value>
        </property>
        <property name="searchService">
            <ref bean="SearchService"/>
        </property>
        <property name="templateService">
            <ref bean="TemplateService"/>
        </property>
        <property name="queryLanguage">
            <value>lucene</value>
        </property>
        <property name="stores">
            <list>
                <value>workspace://SpacesStore</value>
            </list>
        </property>
        <!– Find all nodes that do not have the aspect –>
        <property name="queryTemplate">
            <value>+PATH:"/app:company_home/cm:Clientes/*//*" +TYPE:"{custom.model}Recorte" +@\{http\://www.alfresco.org/model/content/1.0\}content.mimetype:image/tiff</value>
        </property>
        <property name="cronExpression">
            <!–<value>0 */3 * * * ?</value>–>   
         <value>0 0 21 * * ?</value>      
            <!–<value>0 0 14 ? * SAT</value>–>
        </property>
        <property name="jobName">
            <value>jobA</value>
        </property>
        <property name="jobGroup">
            <value>jobGroup</value>
        </property>
        <property name="triggerName">
            <value>triggerA</value>
        </property>
        <property name="triggerGroup">
            <value>triggerGroup</value>
        </property>
        <!– Inject the scheduler - the trigger will be registered with this scheduler –>
        <property name="scheduler">
            <ref bean="schedulerFactory"/>
        </property>
        <property name="actionService">
            <ref bean="ActionService"/>
        </property>
        <property name="templateActionModelFactory">
            <ref bean="templateActionModelFactory"/>
        </property>
        <property name="templateActionDefinition">
            <ref bean="transformPdfOCR"/>
        </property>
        <property name="transactionService">
            <ref bean="TransactionService"/>
        </property>
        <property name="runAsUser">
            <value>admin</value>
        </property>
    </bean>

I saw the information explained in “http://wiki.alfresco.com/wiki/Scheduled_Actions” and set the "transactionMode" property as ISOLATED_TRANSACTIONS so that the process could continue if a failure took place. It´s right?
The problem is the result is not the expected. The process stops and the log file hasn´t any error.

Can someone help me to configure well the scheduled action?

Thanks a lot in advance,
1 REPLY 1

agey
Champ in-the-making
Champ in-the-making
Can anybody help me? The last time when Scheduled action was ran, it failed. The error is this:

21:44:41,921 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Ejecutandose action automaticamente
21:44:41,937 INFO  [org.incis.model.actions.OCRTransformActionExecuter] actionedUponNodeRef workspace://SpacesStore/a4bb1f04-cd94-4524-9171-e9b6560dcab8
21:44:41,937 INFO  [org.incis.model.actions.OCRTransformActionExecuter] originalName OCR_E280610_elcorreo_6.tif
21:44:41,937 INFO  [org.incis.model.actions.OCRTransformActionExecuter] newName OCR_E280610_elcorreo_6.pdf
21:44:42,031 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Transformando …
21:44:42,031 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Inicio transformacion
21:44:49,390 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Fin transformacion
21:44:49,390 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Fin action
21:44:58,156 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Ejecutandose action automaticamente
21:44:58,156 INFO  [org.incis.model.actions.OCRTransformActionExecuter] actionedUponNodeRef workspace://SpacesStore/c84dfd8c-fb81-4fea-aa97-3652dd9720ea
21:44:58,171 INFO  [org.incis.model.actions.OCRTransformActionExecuter] originalName OCR_250610-el dia-6.tif
21:44:58,171 INFO  [org.incis.model.actions.OCRTransformActionExecuter] newName OCR_250610-el dia-6.pdf
21:44:58,640 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Transformando …
21:44:58,640 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Inicio transformacion
21:45:00,453 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Fin transformacion
21:45:00,453 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Fin action
21:45:01,484 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Ejecutandose action automaticamente
21:45:01,484 INFO  [org.incis.model.actions.OCRTransformActionExecuter] actionedUponNodeRef workspace://SpacesStore/5f8e0d3c-91bf-4c62-a09d-18f343b78d91
21:45:01,500 INFO  [org.incis.model.actions.OCRTransformActionExecuter] originalName OCR_250610-la provincia-7.tif
21:45:01,500 INFO  [org.incis.model.actions.OCRTransformActionExecuter] newName OCR_250610-la provincia-7.pdf
21:45:01,578 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Transformando …
21:45:01,578 INFO  [org.incis.model.actions.OCRTransformActionExecuter] Inicio transformacion
22:24:12,109 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.userUsageTrackingJobDetail threw an unhandled Exception:
org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not execute update query; SQL [delete from alf_usage_delta where node_id=?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
   at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:396)
   at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
   at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1141)
   at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO$2.doInHibernate(HibernateUsageDeltaDAO.java:161)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:166)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:149)
   at org.alfresco.repo.usage.UsageServiceImpl.deleteDeltas(UsageServiceImpl.java:65)
   at sun.reflect.GeneratedMethodAccessor852.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 $Proxy42.deleteDeltas(Unknown Source)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:558)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:539)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:246)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsage(UserUsageTrackingComponent.java:579)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.access$600(UserUsageTrackingComponent.java:60)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:519)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:517)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsages(UserUsageTrackingComponent.java:515)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.execute(UserUsageTrackingComponent.java:143)
   at org.alfresco.repo.usage.UserUsageCollapseJob.execute(UserUsageCollapseJob.java:48)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
22:25:53,125 ERROR [org.quartz.core.ErrorLogger] Job (DEFAULT.userUsageTrackingJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not execute update query; SQL [delete from alf_usage_delta where node_id=?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction]
   at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not execute update query; SQL [delete from alf_usage_delta where node_id=?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
   at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:250)
   at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
   at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:377)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:166)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:149)
   at org.alfresco.repo.usage.UsageServiceImpl.deleteDeltas(UsageServiceImpl.java:65)
   at sun.reflect.GeneratedMethodAccessor852.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 $Proxy42.deleteDeltas(Unknown Source)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:558)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:539)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:246)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsage(UserUsageTrackingComponent.java:579)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.access$600(UserUsageTrackingComponent.java:60)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:519)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:517)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsages(UserUsageTrackingComponent.java:515)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.execute(UserUsageTrackingComponent.java:143)
   at org.alfresco.repo.usage.UserUsageCollapseJob.execute(UserUsageCollapseJob.java:48)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   … 1 more
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
   at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:396)
   at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
   at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1141)
   at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO$2.doInHibernate(HibernateUsageDeltaDAO.java:161)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
   … 28 more
23:02:56,406 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.userUsageTrackingJobDetail threw an unhandled Exception:
org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not execute update query; SQL [delete from alf_usage_delta where node_id=?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
   at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:396)
   at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
   at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1141)
   at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO$2.doInHibernate(HibernateUsageDeltaDAO.java:161)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:166)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:149)
   at org.alfresco.repo.usage.UsageServiceImpl.deleteDeltas(UsageServiceImpl.java:65)
   at sun.reflect.GeneratedMethodAccessor852.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 $Proxy42.deleteDeltas(Unknown Source)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:558)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:539)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:246)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsage(UserUsageTrackingComponent.java:579)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.access$600(UserUsageTrackingComponent.java:60)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:519)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:517)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsages(UserUsageTrackingComponent.java:515)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.execute(UserUsageTrackingComponent.java:143)
   at org.alfresco.repo.usage.UserUsageCollapseJob.execute(UserUsageCollapseJob.java:48)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
23:02:56,421 ERROR [org.quartz.core.ErrorLogger] Job (DEFAULT.userUsageTrackingJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not execute update query; SQL [delete from alf_usage_delta where node_id=?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction]
   at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.springframework.dao.CannotAcquireLockException: Hibernate operation: could not execute update query; SQL [delete from alf_usage_delta where node_id=?]; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
   at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:250)
   at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
   at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:377)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:166)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO.deleteDeltas(HibernateUsageDeltaDAO.java:149)
   at org.alfresco.repo.usage.UsageServiceImpl.deleteDeltas(UsageServiceImpl.java:65)
   at sun.reflect.GeneratedMethodAccessor852.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 $Proxy42.deleteDeltas(Unknown Source)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:558)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$9.execute(UserUsageTrackingComponent.java:539)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:246)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsage(UserUsageTrackingComponent.java:579)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.access$600(UserUsageTrackingComponent.java:60)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:519)
   at org.alfresco.repo.usage.UserUsageTrackingComponent$8.doWork(UserUsageTrackingComponent.java:517)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.collapseUsages(UserUsageTrackingComponent.java:515)
   at org.alfresco.repo.usage.UserUsageTrackingComponent.execute(UserUsageTrackingComponent.java:143)
   at org.alfresco.repo.usage.UserUsageCollapseJob.execute(UserUsageCollapseJob.java:48)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   … 1 more
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
   at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:396)
   at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
   at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1141)
   at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
   at org.alfresco.repo.domain.hibernate.HibernateUsageDeltaDAO$2.doInHibernate(HibernateUsageDeltaDAO.java:161)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
   … 28 more
23:16:01,265 ERROR [org.alfresco.repo.shutdown.ShutdownBackstop] Alfresco terminating via Shutdown Backstop
23:16:11,046 ERROR [org.alfresco.repo.shutdown.ShutdownBackstop] Alfresco terminated

What happens? Perhaps there are too many files? This job begins at 21.00 and transforms over 100 files in about 30 minutes every day but this time there were over 306 files.

Thanks a lot in advance,