[
http://jira.jboss.com/jira/browse/JBRULES-960?page=all ]
Edson Tirelli resolved JBRULES-960.
-----------------------------------
Resolution: Done
The problem is that SpringAOP is generating a proxy whose methods equals() and hashCode()
are "final". As drools must either override these methods in the shadow proxy or
not shadow the fact at all, I'm disabling shadow proxy generation for this use case.
It is really important to note that if you are asserting SpringAOP proxies as facts into
the working memory, you will not be able to change any field value whose field is
constrained in rules or you may incur in a memory leak and non-deterministic behavior by
the rules engine. Unfortunately there is nothing we can do about, since when SpringAOP
makes the methods equals and hashcode final, we can't override them anymore and as so,
we can't shadow them.
WorkingMemory cannot insert proxy object
----------------------------------------
Key: JBRULES-960
URL:
http://jira.jboss.com/jira/browse/JBRULES-960
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.0.MR3
Reporter: zhou yanming
Assigned To: Edson Tirelli
Priority: Critical
Fix For: 4.0.0.MR4
Attachments: Main.java
object was proxied by CGLIB,and works fine with 4.0.0.MR2,but when I upgrade to
4.0.0.MR3,It raise a exception
Caused by: java.lang.VerifyError: model.Order$$EnhancerByCGLIB$$d6d596a8ShadowProxy
overrides final method ?0ó*h=+.?0ó*h=+
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:40)
at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:59)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.drools.reteoo.Rete$ObjectTypeConf.<init>(Rete.java:352)
at org.drools.reteoo.Rete.assertObject(Rete.java:152)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:584)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira