<?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: java.util.ConcurrentModificationException in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203359#M156489</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Martin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While debugging Activiti code I found that there is one daemon thread which calls repeatedly and it flushes session by calling CommandContext. So It seems that this is the thing which is creating issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shall I modify Activiti code for method flushSessions() by making it synchronized? Please suggest me possible workaround as it's road blocker for my project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to give you idea about what we are trying to achieve, we are developing our own REST wrapper using activiti.jar which will be used by our clients. We are using Tomcat as container.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Oct 2014 05:26:00 GMT</pubDate>
    <dc:creator>hardik_thakkar1</dc:creator>
    <dc:date>2014-10-01T05:26:00Z</dc:date>
    <item>
      <title>java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203354#M156484</link>
      <description>Hello,I am getting below exception while running code from Web-app. Please help.SEVERE: Servlet.service() for servlet appServlet threw exceptionjava.util.ConcurrentModificationException&amp;nbsp;&amp;nbsp;&amp;nbsp;at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)&amp;nbsp;&amp;nbsp;&amp;nbsp;at java.util.HashMap$ValueIterator.next(HashMap.</description>
      <pubDate>Thu, 28 Aug 2014 04:48:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203354#M156484</guid>
      <dc:creator>hardik_thakkar1</dc:creator>
      <dc:date>2014-08-28T04:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203355#M156485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;exception is connected to the deployment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you create jUnit test for it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/" rel="nofollow noopener noreferrer"&gt;http://www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:23:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203355#M156485</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-08-28T10:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203356#M156486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Martin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not getting this exception every time. Sometimes it works fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What can be root cause of this? I can see it occurs while calling org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:210). Not sure how to overcome this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tested this from standalone program, it's working fine. But getting issue while running it from container, Tomcat.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 05:50:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203356#M156486</guid>
      <dc:creator>hardik_thakkar1</dc:creator>
      <dc:date>2014-09-30T05:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203357#M156487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Adding more logs..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [activiti.cfg.xml]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO : org.activiti.engine.impl.ProcessEngineImpl - ProcessEngine default created&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO : org.activiti.engine.impl.jobexecutor.JobExecutor - Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO : org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable - JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENGINE_CREATED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO : org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource FinancialReportProcess.bpmn20.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENTITY_CREATED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENTITY_INITIALIZED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ACTIVITY_STARTED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ACTIVITY_COMPLETED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: SEQUENCEFLOW_TAKEN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ACTIVITY_STARTED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENTITY_CREATED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENTITY_INITIALIZED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENTITY_CREATED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: ENTITY_INITIALIZED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event received: TASK_CREATED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;30-Sep-2014 16:14:20 org.apache.catalina.core.StandardWrapperValve invoke&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SEVERE: Servlet.service() for servlet appServlet threw exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;java.util.ConcurrentModificationException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.HashMap$ValueIterator.next(HashMap.java:822)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:210)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:137)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:69)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.rbos.marketrisk.service.impl.WFManagementServiceImpl.initiateWorkflow(WFManagementServiceImpl.java:18)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.rbos.marketrisk.controllers.WFManagementController.initiateWorkflow(WFManagementController.java:43)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.reflect.Method.invoke(Method.java:597)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:214)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:931)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:822)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 10:49:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203357#M156487</guid>
      <dc:creator>hardik_thakkar1</dc:creator>
      <dc:date>2014-09-30T10:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203358#M156488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that another thread has modified sessions map concurrently. (I think that I have read related topic on this forum already some time ago - try to search for it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 19:37:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203358#M156488</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-09-30T19:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203359#M156489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Martin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While debugging Activiti code I found that there is one daemon thread which calls repeatedly and it flushes session by calling CommandContext. So It seems that this is the thing which is creating issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shall I modify Activiti code for method flushSessions() by making it synchronized? Please suggest me possible workaround as it's road blocker for my project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to give you idea about what we are trying to achieve, we are developing our own REST wrapper using activiti.jar which will be used by our clients. We are using Tomcat as container.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 05:26:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203359#M156489</guid>
      <dc:creator>hardik_thakkar1</dc:creator>
      <dc:date>2014-10-01T05:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: java.util.ConcurrentModificationException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203360#M156490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can we make context reusable? I can see every time it tries to flush sessions. I want to flush them once context is destroyed. Is there any configuration for making context as reusable? Please suggest.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 05:33:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-util-concurrentmodificationexception/m-p/203360#M156490</guid>
      <dc:creator>hardik_thakkar1</dc:creator>
      <dc:date>2014-10-01T05:33:47Z</dc:date>
    </item>
  </channel>
</rss>

