<br> Do you really need to assert an Iterator into memory? this does not "sound" good to me...<br><br> If you really need, IMO you have 2 options: either create your own wrapper for the "array iterator", that is not a "final" nor "private" class, or disable shadow facts for this class only. If you need to change anything in it, make sure you do that inside a modify() block, not using update.<br>
<br><a href="http://blog.athico.com/2007/12/modify-block-for-java-dialect.html">http://blog.athico.com/2007/12/modify-block-for-java-dialect.html</a><br><br><a href="http://blog.athico.com/2008/02/shadow-facts-what-you-always-wanted-to.html">http://blog.athico.com/2008/02/shadow-facts-what-you-always-wanted-to.html</a><br>
<br> []s<br> Edson<br><br><br><div><span class="gmail_quote">2008/4/1, Narendra Valada <<a href="mailto:narendra.valada@gmail.com">narendra.valada@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi,</div>
<div> </div>
<div>I am upgrading to Drools 4.0.4 and I am getting this exception when executing this rule:</div>
<div> </div>
<div>rule "insert iterator"<br>when <br> somecondition<br>then<br> insert(Arrays.asList(some array).iterator());<br>end</div>
<div> </div>
<div>Here is the exception. Is this a bug? Disabling shadow copy is not really an option for this application.</div>
<div><font color="#ff0000" size="2">
<p align="left">Exception in thread "pool-1-thread-1" java.lang.IllegalAccessError: class org.drools.shadow.java.util.AbstractList$ItrShadowProxy cannot access its superclass java.util.AbstractList$Itr</p>
<p align="left">at java.lang.ClassLoader.defineClass1(</p></font><u><font color="#000080" size="2">Native Method</font></u><font color="#ff0000" size="2">)
<p align="left">at java.lang.ClassLoader.defineClass(Unknown Source)</p>
<p align="left">at org.drools.rule.MapBackedClassLoader.fastFindClass(</p></font><u><font color="#000080" size="2">MapBackedClassLoader.java:60</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.rule.MapBackedClassLoader.loadClass(</p></font><u><font color="#000080" size="2">MapBackedClassLoader.java:79</font></u><font color="#ff0000" size="2">)
<p align="left">at java.lang.ClassLoader.loadClass(Unknown Source)</p>
<p align="left">at org.drools.reteoo.Rete$ClassObjectTypeConf.loadOrGenerateProxy(</p></font><u><font color="#000080" size="2">Rete.java:547</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.reteoo.Rete$ClassObjectTypeConf.defineShadowProxyData(</p></font><u><font color="#000080" size="2">Rete.java:494</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.reteoo.Rete$ClassObjectTypeConf.<init>(</p></font><u><font color="#000080" size="2">Rete.java:461</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.reteoo.Rete.assertObject(</p></font><u><font color="#000080" size="2">Rete.java:152</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.reteoo.ReteooRuleBase.assertObject(</p></font><u><font color="#000080" size="2">ReteooRuleBase.java:192</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.reteoo.ReteooWorkingMemory.doInsert(</p></font><u><font color="#000080" size="2">ReteooWorkingMemory.java:71</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.common.AbstractWorkingMemory.insert(</p></font><u><font color="#000080" size="2">AbstractWorkingMemory.java:909</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.common.AbstractWorkingMemory.insert(</p></font><u><font color="#000080" size="2">AbstractWorkingMemory.java:881</font></u><font color="#ff0000" size="2">)
<p align="left">at org.drools.base.DefaultKnowledgeHelper.insert(</p></font><u><font color="#000080" size="2">DefaultKnowledgeHelper.java:67</font></u><font color="#ff0000" size="2">)
<p>at org.drools.base.DefaultKnowledgeHelper.insert(</p></font><u><font color="#000080" size="2">DefaultKnowledgeHelper.java:61</font></u><font color="#ff0000" size="2">)</font>
<p><font color="#ff0000" size="2"></font> </p>
<p><font color="#ff0000" size="2">Thanks,</font></p>
<p><font color="#ff0000" size="2"></font> </p><span class="sg">
<p><font color="#ff0000" size="2">Narendra Valada</font></p></span></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>