[
https://issues.jboss.org/browse/JBRULES-1009?page=com.atlassian.jira.plug...
]
Mark Proctor resolved JBRULES-1009.
-----------------------------------
Resolution: Out of Date
This was reported against 4.0. Please re-open if this issue remains.
Can't execute rules twice with a second classloader
---------------------------------------------------
Key: JBRULES-1009
URL:
https://issues.jboss.org/browse/JBRULES-1009
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (expert)
Affects Versions: 4.0.0.MR3
Reporter: aaron dixon
Assignee: Mark Proctor
Priority: Minor
Fix For: FUTURE
Attachments: drools-test.zip
I am trying to sequentially perform two rules executions using two
different classloaders in the same VM. I create completely new state
for each execution, yet I still fail on the second execution (the first execution
succeeds). I
believe this has to do with some internal static cached state that
JBossRules is maintaining. An integration test is attached as an archived Eclipse project
(zip).
Exception thrown:
Exception in thread "main" java.lang.ClassCastException:
test.drools.classloader.FooShadowProxy
at org.drools.base.test.drools.classloader.Foo$getName.getValue(Unknown Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:94)
at
org.drools.base.evaluators.StringFactory$StringEqualEvaluator.evaluate(StringFactory.java:85)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
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)
at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:63)
at test.drools.classloader.Driver.testRules(Driver.java:49)
at test.drools.classloader.Driver.go(Driver.java:35)
at test.drools.classloader.Driver.main(Driver.java:19)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira