[rules-users] Upgrading to 4.0.4
Edson Tirelli
tirelli at post.com
Tue Apr 1 15:09:58 EDT 2008
Do you really need to assert an Iterator into memory? this does not
"sound" good to me...
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.
http://blog.athico.com/2007/12/modify-block-for-java-dialect.html
http://blog.athico.com/2008/02/shadow-facts-what-you-always-wanted-to.html
[]s
Edson
2008/4/1, Narendra Valada <narendra.valada at gmail.com>:
>
> Hi,
>
> I am upgrading to Drools 4.0.4 and I am getting this exception when
> executing this rule:
>
> rule "insert iterator"
> when
> somecondition
> then
> insert(Arrays.asList(some array).iterator());
> end
>
> Here is the exception. Is this a bug? Disabling shadow copy is not really
> an option for this application.
>
> 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
>
> at java.lang.ClassLoader.defineClass1(
> *Native Method*)
>
> at java.lang.ClassLoader.defineClass(Unknown Source)
>
> at org.drools.rule.MapBackedClassLoader.fastFindClass(
> *MapBackedClassLoader.java:60*)
>
> at org.drools.rule.MapBackedClassLoader.loadClass(
> *MapBackedClassLoader.java:79*)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
>
> at org.drools.reteoo.Rete$ClassObjectTypeConf.loadOrGenerateProxy(
> *Rete.java:547*)
>
> at org.drools.reteoo.Rete$ClassObjectTypeConf.defineShadowProxyData(
> *Rete.java:494*)
>
> at org.drools.reteoo.Rete$ClassObjectTypeConf.<init>(
> *Rete.java:461*)
>
> at org.drools.reteoo.Rete.assertObject(
> *Rete.java:152*)
>
> at org.drools.reteoo.ReteooRuleBase.assertObject(
> *ReteooRuleBase.java:192*)
>
> at org.drools.reteoo.ReteooWorkingMemory.doInsert(
> *ReteooWorkingMemory.java:71*)
>
> at org.drools.common.AbstractWorkingMemory.insert(
> *AbstractWorkingMemory.java:909*)
>
> at org.drools.common.AbstractWorkingMemory.insert(
> *AbstractWorkingMemory.java:881*)
>
> at org.drools.base.DefaultKnowledgeHelper.insert(
> *DefaultKnowledgeHelper.java:67*)
>
> at org.drools.base.DefaultKnowledgeHelper.insert(
> *DefaultKnowledgeHelper.java:61*)
>
>
>
> Thanks,
>
>
>
> Narendra Valada
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080401/43b586a4/attachment.html
More information about the rules-users
mailing list