FYI - ConcurrentModificationException is the most misleading exception name  ever !!! - it never really means what you think it means - it means you were modifying some collection while dealing with its iterator or similar - doesn&#39;t even need to be more than one thread. How annoying !<div>
<br></div><div>So mentally, replace ConcurrentModificationException with &quot;ModifyingACollectionWhileIteratingException&quot; ! Or else, like me, waste years of your life fretting about threading issues only to realise that isn&#39;t the problem (and its usually something far simpler).</div>
<div><br></div><div><br><br><div class="gmail_quote">On Tue, Jun 22, 2010 at 11:25 PM, Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Are you inserting facts from different threads in a statefull session?<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Jun 22, 2010 at 10:21 AM,  <span dir="ltr">&lt;<a href="mailto:Tom.E.Murphy@wellsfargo.com" target="_blank">Tom.E.Murphy@wellsfargo.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">






<div>
<font face="Calibri, sans-serif" size="2">
<div>Anybody have any ideas on this?</div>
<div> </div>
<div>We are seeing <font face="Times New Roman, serif" size="3">ConcurrentModificationException</font> while inserting objects into working memory. This happens occasionally, either at service start-up, where the first transaction is being submitted and the
rules are loading for the first time, or sometimes under heavy loads with lots of transactions being processed by the service:</div>
<div>Drools 5.0.1-GA</div>
<div>AS: Web Logic</div>
<div>JVM: 1.5</div>
<div> </div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">Fragment of stack trace:</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">Caused by: java.util.ConcurrentModificationException</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">java.util.HashMap$HashIterator.nextEntry(HashMap.java:2117)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">java.util.HashMap$ValueIterator.next(HashMap.java:2147)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.reteoo.EntryPointNode.updateSink(EntryPointNode.java:285)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.reteoo.ObjectTypeNode.attach(ObjectTypeNode.java:279)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:234)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.reteoo.ClassObjectTypeConf.&lt;init&gt;(ClassObjectTypeConf.java:93)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:58)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:849)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)</font></div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Times New Roman, serif" size="3">org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:216)</font></div>
<div><font face="Times New Roman, serif" size="3">com.wellsfargo.ARGenT.Execution.DefaultLoader.Load(DefaultLoader.java:16)</font></div>
<div> </div>
<div> </div>
<div style="margin-top:5pt;margin-bottom:5pt"><font face="Georgia, serif" size="2"><b>Tom Murphy<br>

<br>

</b><font face="Verdana, sans-serif" size="1">Business Process Consultant<br>

Wells Fargo HCFG - CORE Deal Decisioning Platform<br>

<br>

</font><font color="#7f7f7f" face="Verdana, sans-serif" size="1">800 S. Jordan Creek Parkway | West Des Moines, IA 50266<br>

MAC: X2301-01B<br>

</font><font color="#7f7f7f" face="Verdana, sans-serif" size="1">Office: 515 324 4853 | Mobile: 515 423 4334<br>

<br>

</font><font face="Verdana, sans-serif" size="1"><a href="mailto:tom.e.murphy@wellsfargo.com" target="_blank">tom.e.murphy@wellsfargo.com</a><br>

<br>

</font><font color="#44464a" face="Verdana, sans-serif" size="1">This transmission may contain information that is confidential and/or proprietary. If you are not the individual or entity to which it is addressed, note that any review, disclosure, copying,
retransmission, or other use is strictly prohibited. If you received this transmission in error, please notify the sender immediately and delete the material from your system.</font></font></div>
<div> </div>
<div> </div>
<div> </div>
</font>
</div>

<br></div></div>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>

 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -<br>
</font><br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael D Neale<br>home: <a href="http://www.michaelneale.net">www.michaelneale.net</a><br>blog: <a href="http://michaelneale.blogspot.com">michaelneale.blogspot.com</a><br>

</div>