<?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 Re: Unique contraint violated - ACT_HI_VARINST(ID_) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123483#M86963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it thread safe?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Search the internet:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://bit.ly/WAnszH" rel="nofollow noopener noreferrer"&gt;http://bit.ly/WAnszH&lt;/A&gt;&lt;SPAN&gt; (read the whole topic)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;and how do I set Activiti use StrongUuidGenerator instead of DB-approach?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Search the internet: &lt;/SPAN&gt;&lt;A href="http://bit.ly/116NtOz" rel="nofollow noopener noreferrer"&gt;http://bit.ly/116NtOz&lt;/A&gt;&lt;SPAN&gt; (hint: read e.g. the ACT-789 at the end)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2013 07:25:46 GMT</pubDate>
    <dc:creator>ronald_van_kuij</dc:creator>
    <dc:date>2013-01-30T07:25:46Z</dc:date>
    <item>
      <title>Unique contraint violated - ACT_HI_VARINST(ID_)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123478#M86958</link>
      <description>When we have activiti engine running in 2 different servers (trying to setup a clustered environment) pointing to same DB schema. one of the engines is throwing java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (APP.SYS_C00386332) violated. This is violating unique cons</description>
      <pubDate>Mon, 28 Jan 2013 16:00:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123478#M86958</guid>
      <dc:creator>badrisudheer</dc:creator>
      <dc:date>2013-01-28T16:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unique contraint violated - ACT_HI_VARINST(ID_)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123479#M86959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By default Activiti does use a kind of sequence&amp;nbsp; with batches to get ID blocks, but in a db independent way…&amp;nbsp; That two servers get the same block sounds kind of strange and I never heard something like this before. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Isn't there by accident old data in the database and the 'sequence' is reset by accident?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 19:30:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123479#M86959</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2013-01-28T19:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unique contraint violated - ACT_HI_VARINST(ID_)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123480#M86960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is a property in the ACT_GE_PROPERTY, containing the start of the next "block" of ID's to use, if you're using the default ID-generation strategy. This mechanism will make sure a single engine will use a block of ID's without conflicts, having only one thread allocating a new block. When multiple engines are using the same DB, and they (under heavy load) both fetch a new block at the same time, they will both try to update the 'next.dbid' property in ACT_GE_PROPERTY, one of them should get an ActivitiOptimisticLockException.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have duplicate id's, this means this mechanism didn't work as expected, which sounds strange.Can you check if it's a whole block of ID's that are duplicate? Or just a few randomly distributed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also use the StrongUUIDGenerator as id-generator, instead of the DB-approach:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/**&lt;BR /&gt; * {@link IdGenerator} implementation based on the current time and the ethernet&lt;BR /&gt; * address of the machine it is running on.&lt;BR /&gt; * &lt;BR /&gt; * @author Daniel Meyer&lt;BR /&gt; */&lt;BR /&gt;public class StrongUuidGenerator implements IdGenerator {&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 09:14:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123480#M86960</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-01-29T09:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unique contraint violated - ACT_HI_VARINST(ID_)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123481#M86961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;By default Activiti does use a kind of sequence&amp;nbsp; with batches to get ID blocks, but in a db independent way…&amp;nbsp; That two servers get the same block sounds kind of strange and I never heard something like this before. &lt;BR /&gt;&lt;BR /&gt;Isn't there by accident old data in the database and the 'sequence' is reset by accident?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;We have configured activiti.database.update=true in that environment. So, I hope the old data does stay in ACT_ tables when we do Upgrade of Activiti version and every time we deploy the application. But, I did not understand what do you mean by 'sequence' reset, how can I verify that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 22:55:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123481#M86961</guid>
      <dc:creator>badrisudheer</dc:creator>
      <dc:date>2013-01-29T22:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unique contraint violated - ACT_HI_VARINST(ID_)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123482#M86962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;There is a property in the ACT_GE_PROPERTY, containing the start of the next "block" of ID's to use, if you're using the default ID-generation strategy. This mechanism will make sure a single engine will use a block of ID's without conflicts, having only one thread allocating a new block. When multiple engines are using the same DB, and they (under heavy load) both fetch a new block at the same time, they will both try to update the 'next.dbid' property in ACT_GE_PROPERTY, one of them should get an ActivitiOptimisticLockException.&lt;BR /&gt;&lt;BR /&gt;If you have duplicate id's, this means this mechanism didn't work as expected, which sounds strange.Can you check if it's a whole block of ID's that are duplicate? Or just a few randomly distributed?&lt;BR /&gt;&lt;BR /&gt;You could also use the StrongUUIDGenerator as id-generator, instead of the DB-approach:&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/**&lt;BR /&gt; * {@link IdGenerator} implementation based on the current time and the ethernet&lt;BR /&gt; * address of the machine it is running on.&lt;BR /&gt; * &lt;BR /&gt; * @author Daniel Meyer&lt;BR /&gt; */&lt;BR /&gt;public class StrongUuidGenerator implements IdGenerator {&lt;BR /&gt;&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I did observe ActivitiOptimisticLockException errors in some cases but, in other cases I was seeing Unique constraint violation errors. The big problem is when this happens the workflow for which the exception was thrown gets hung. I do see the 'next.dbid' property in ACT_GE_PROPERTY getting updated. So, It looks like we are using DB-approach. Is StrongUUIDGenerator provided by Activiti framework. If so, How do I set activiti to use StrongUUIDGenerator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: I did see StrongUuidGenerator under org.activiti.engine.impl.persistence package. Is it thread safe? and how do I set Activiti use StrongUuidGenerator instead of DB-approach?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 23:11:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123482#M86962</guid>
      <dc:creator>badrisudheer</dc:creator>
      <dc:date>2013-01-29T23:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unique contraint violated - ACT_HI_VARINST(ID_)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123483#M86963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it thread safe?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Search the internet:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://bit.ly/WAnszH" rel="nofollow noopener noreferrer"&gt;http://bit.ly/WAnszH&lt;/A&gt;&lt;SPAN&gt; (read the whole topic)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;and how do I set Activiti use StrongUuidGenerator instead of DB-approach?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Search the internet: &lt;/SPAN&gt;&lt;A href="http://bit.ly/116NtOz" rel="nofollow noopener noreferrer"&gt;http://bit.ly/116NtOz&lt;/A&gt;&lt;SPAN&gt; (hint: read e.g. the ACT-789 at the end)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 07:25:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unique-contraint-violated-act-hi-varinst-id/m-p/123483#M86963</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2013-01-30T07:25:46Z</dc:date>
    </item>
  </channel>
</rss>

