<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ActivitiOptimisticException with single JobExecutor in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198812#M151942</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have written a custom code overriding Locking for jobs in acquireJobCmd. The application uses Hibernate for database connection. Sometimes we experience ActivitiOptimisticLockingException for a job and that job gets stuck with a lock owner till it reaches lock expiration time. The exception that occurs is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR pool-1-thread-5 org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable - exception during job execution: ProcessInstance[d108d1cf-ada6-11e4-9e28-c2e2b6a89800] was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.activiti.engine.ActivitiOptimisticLockingException: ProcessInstance[d108d1cf-ada6-11e4-9e28-c2e2b6a89800] was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:777)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:588)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:211)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:137)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:52)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have not accessed that job/process instance other after locking it. What may be the reason we get this Exception even when we are on Single Server environment?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2015 10:31:30 GMT</pubDate>
    <dc:creator>sushantmahajan</dc:creator>
    <dc:date>2015-02-10T10:31:30Z</dc:date>
    <item>
      <title>ActivitiOptimisticException with single JobExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198812#M151942</link>
      <description>We have written a custom code overriding Locking for jobs in acquireJobCmd. The application uses Hibernate for database connection. Sometimes we experience ActivitiOptimisticLockingException for a job and that job gets stuck with a lock owner till it reaches lock expiration time. The exception that</description>
      <pubDate>Tue, 10 Feb 2015 10:31:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198812#M151942</guid>
      <dc:creator>sushantmahajan</dc:creator>
      <dc:date>2015-02-10T10:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticException with single JobExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198813#M151943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are on single node, you shouldn't see this. Are you changing data of the job yourself when the job is being executed? That could explain the optimistic locking problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 11:57:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198813#M151943</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-02-18T11:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticException with single JobExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198814#M151944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are experiencing ActivitOptimisticexception two cases on single server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. When we try to delete a running job. Please suggest how to carefully wait before calling runTimeService.deleteProcessInstance(String processInstanceId, String deleteReason).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. We have customised AcquiredJobCommand, that in execute method we set its lock owner, lock expiration time and retries and then add the job to AcquiredJobs. What among these be a reason for this exception? Please suggest.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 05:56:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198814#M151944</guid>
      <dc:creator>sushantmahajan</dc:creator>
      <dc:date>2015-02-24T05:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticException with single JobExecutor</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198815#M151945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. What's the reason for wanting to delete a process instance while the job is running? The logic being executed in the job will remain running anyways, so it's best to delete the process instance after the job has stopped running.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Can you explain the reasoning behing changing the command? Are you using the new async job executor or the other job executor? When do you see the ActivitiOptimisticLockException occurring?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 19:31:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticexception-with-single-jobexecutor/m-p/198815#M151945</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-02-24T19:31:56Z</dc:date>
    </item>
  </channel>
</rss>

