<?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: ActivitiOptimisticLockingException: ByteArrayEntity in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154469#M108928</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have same problem with HashSet variable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could we use TreeSet instead ? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2016 08:01:05 GMT</pubDate>
    <dc:creator>ilyagalahov</dc:creator>
    <dc:date>2016-03-25T08:01:05Z</dc:date>
    <item>
      <title>ActivitiOptimisticLockingException: ByteArrayEntity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154465#M108924</link>
      <description>We are getting random ActivitiOptimisticLockingException's and are struggling to understand why.&amp;nbsp; We do have multiple instances of the Activiti engine running against one database, but there aren't any parallel threads going, and the error occurs on a RuntimeServiceImpl.getVariable() call, as below.</description>
      <pubDate>Thu, 17 Apr 2014 20:42:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154465#M108924</guid>
      <dc:creator>hbpost</dc:creator>
      <dc:date>2014-04-17T20:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticLockingException: ByteArrayEntity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154466#M108925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also, in this forum post &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/content/activiti-process-variable-version-and-optimistic-locking-exception" rel="nofollow noopener noreferrer"&gt;Activiti process variable version and Optimistic Locking Exception&lt;/A&gt;&lt;SPAN&gt; it is stated that HashMaps should not be used as process variables. We are in fact doing this as we have large collections of variables and it is very convenient to contain them in HashMaps.&amp;nbsp; Is this really not permitted?&amp;nbsp; All of the classes we put in the HashMap have hashCode implemented, and it is not clear to me why this would be a problem.&amp;nbsp;&amp;nbsp; Could someone please explain?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 17:31:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154466#M108925</guid>
      <dc:creator>hbpost</dc:creator>
      <dc:date>2014-04-18T17:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticLockingException: ByteArrayEntity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154467#M108926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's explained a bit in the post you reference. Serializable variables, when fetched from the DB, are added to a special kind of context. Once the command-context closes (eg. when the getVariables() API call is about to return), these serializables are inspected to see if they have changed -&amp;gt; this is done by comparing the serialized state of the object in-mem, with the state in the DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When a hashmap is deserialized, a new bucketlist/tree is build. Since it's a hashmap and most object use virtual address as base for the hashcode, the "keys" hashes in the map will differe every time the map is loaded from DB into memory. So the variable is marked as "stale" by activiti and inserted agian. Offcourse, actual keys and values haven't changed but their hash code could have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Solution is to either override readObject() and writeObject() to have a stable serialise / deserialize of the map OR use JSON.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 09:06:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154467#M108926</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-04-22T09:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticLockingException: ByteArrayEntity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154468#M108927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your response, now it is clear to me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 22:23:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154468#M108927</guid>
      <dc:creator>hbpost</dc:creator>
      <dc:date>2014-04-22T22:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiOptimisticLockingException: ByteArrayEntity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154469#M108928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have same problem with HashSet variable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could we use TreeSet instead ? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 08:01:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitioptimisticlockingexception-bytearrayentity/m-p/154469#M108928</guid>
      <dc:creator>ilyagalahov</dc:creator>
      <dc:date>2016-03-25T08:01:05Z</dc:date>
    </item>
  </channel>
</rss>

