[JBoss JIRA] Created: (JBRULES-1009) Can't execute rules twice with a second classloader
by aaron dixon (JIRA)
Can't execute rules twice with a second classloader
---------------------------------------------------
Key: JBRULES-1009
URL: http://jira.jboss.com/jira/browse/JBRULES-1009
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 4.0.0.MR3
Reporter: aaron dixon
Assigned To: Mark Proctor
Priority: Minor
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 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
12 years, 1 month