<br>   Hi Tom,<br><br>   I don&#39;t think the nested call is the problem, because it is a call to a specific node downstream. I am thinking it could be due to the fact that a thread could be inserting data into the same or another entry point concurrently that is causing a side effect (although they should be isolated).<br>
<br>   Would you please open a JIRA for this and let me know? I will take a careful look into this.<br><br>   Thanks<br>       Edson<br><br><div class="gmail_quote">2009/11/10  <span dir="ltr">&lt;<a href="mailto:Tom.E.Murphy@wellsfargo.com">Tom.E.Murphy@wellsfargo.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">






<div>
<font face="Calibri, sans-serif" size="2">
<div>Using Drools 5.0.1 FINAL</div>
<div> </div>
<div>Our logs contain the following exception:</div>
<div> </div>
<div><font face="Courier New, monospace" size="2">java.util.ConcurrentModificationException</font></div>
<div><font face="Courier New, monospace" size="2">        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:2117)</font></div>
<div><font face="Courier New, monospace" size="2">        at java.util.HashMap$ValueIterator.next(HashMap.java:2147)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.reteoo.EntryPointNode.updateSink(EntryPointNode.java:285)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.reteoo.ObjectTypeNode.attach(ObjectTypeNode.java:279)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:234)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.reteoo.ClassObjectTypeConf.&lt;init&gt;(ClassObjectTypeConf.java:93)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:58)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:849)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)</font></div>
<div><font face="Courier New, monospace" size="2">        at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:216)</font></div>
<div><font face="Courier New, monospace" size="2">        at com.wellsfargo.ARGenT.Execution.SimXmlDataLoader.Load(SimXmlDataLoader.java:713)</font></div>
<div> </div>
<div> </div>
<div> </div>
<div>The code fragment around line 285 of EntryPointNode.java is the following:</div>
<div>Could the nested call to assertObject be causing the ConcurrentModificationException? </div>
<div>In other words, could the call to sink.assertObject cause an eventual recursive entry into updateSink or call another method that changes the registry and effectively invalidates the objectTypeConf iterator?</div>
<div> </div>
<div> </div>
<div> </div>
<div> <font face="Courier New, monospace">   public void updateSink(final ObjectSink sink,</font></div>
<div><font face="Courier New, monospace">                           final PropagationContext context,</font></div>
<div><font face="Courier New, monospace">                           final InternalWorkingMemory workingMemory) {</font></div>
<div><font face="Courier New, monospace">        // @todo</font></div>
<div><font face="Courier New, monospace">        // JBRULES-612: the cache MUST be invalidated when a new node type is added to the network, so iterate and reset all caches.</font></div>
<div><font face="Courier New, monospace">        final ObjectTypeNode node = (ObjectTypeNode) sink;</font></div>
<div><font face="Courier New, monospace"> </font></div>
<div><font face="Courier New, monospace">        final ObjectType newObjectType = node.getObjectType();</font></div>
<div><font face="Courier New, monospace"> </font></div>
<div style="padding-left: 36pt;"><font face="Courier New, monospace">   InternalWorkingMemoryEntryPoint wmEntryPoint = (InternalWorkingMemoryEntryPoint) workingMemory.getWorkingMemoryEntryPoint( this.entryPoint.getEntryPointId() );</font></div>

<div> </div>
<div><font face="Courier New, monospace">LINE 285: for ( ObjectTypeConf objectTypeConf : wmEntryPoint.getObjectTypeConfigurationRegistry().values() ) {</font></div>
<div><font face="Courier New, monospace">            if ( newObjectType.isAssignableFrom( objectTypeConf.getConcreteObjectTypeNode().getObjectType() ) ) {</font></div>
<div><font face="Courier New, monospace">                objectTypeConf.resetCache();</font></div>
<div><font face="Courier New, monospace">                ObjectTypeNode sourceNode = objectTypeConf.getConcreteObjectTypeNode();</font></div>
<div><font face="Courier New, monospace">                Iterator it = ((ObjectHashSet) workingMemory.getNodeMemory( sourceNode )).iterator();</font></div>
<div><font face="Courier New, monospace">                for ( ObjectEntry entry = (ObjectEntry) it.next(); entry != null; entry = (ObjectEntry) it.next() ) {</font></div>
<div><font face="Courier New, monospace">                    sink.assertObject( (InternalFactHandle) entry.getValue(),</font></div>
<div><font face="Courier New, monospace">                                       context,</font></div>
<div><font face="Courier New, monospace">                                       workingMemory );</font></div>
<div><font face="Courier New, monospace">                }</font></div>
<div><font face="Courier New, monospace">            }</font></div>
<div><font face="Courier New, monospace">        }</font></div>
<div><font face="Courier New, monospace">    }</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt;"><font color="#4f81bd" face="Cambria, serif" size="4"><b>Tom Murphy<br>

</b><font color="#000000" face="Calibri, sans-serif" size="2"><i>Business Process Consultant<br>

Wells Fargo HCFG - CORE Deal Decisioning Platform<br>

800 S. Jordan Creek Parkway | West Des Moines, IA 50266<br>

MAC: </i></font><font color="#ff0000" face="Calibri, sans-serif" size="2"><i><b>X2301-01B<br>

</b></i></font><font color="#000000" face="Calibri, sans-serif" size="2"><b>Office: </b></font><font color="#1f497d" face="Calibri, sans-serif" size="2"><b>515 324 4853</b></font><font color="#000000" face="Calibri, sans-serif" size="2"><b> | Mobile: 941 320
8014<br>

</b></font><font color="#808080" face="Calibri, sans-serif" size="1"><i>This message may contain confidential and/or privileged information.  If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or
take any action based on this message or any information herein.  If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.  Thank you for your cooperation.</i></font></font></div>

<div> </div>
<div> </div>
<div> </div>
</font>
</div>

<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">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>