[jboss-jira] [JBoss JIRA] Commented: (JBRULES-909) java.lang.ClassCastException: org.drools.rule.AbstractCompositeConstraint$MultiFieldOrConstraintContextEntry
Dirk Bergstrom (JIRA)
jira-events at lists.jboss.org
Tue Jun 12 23:30:11 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-909?page=comments#action_12365128 ]
Dirk Bergstrom commented on JBRULES-909:
----------------------------------------
After changing most of the rules (to remove the last predicate expressions and tighten up some of the logic), I find this bug now affects pretty much everything. So I disabled all the rules except this one (the simplest one):
rule "Find all PRs for user"
when
$user : User( $reports : allReportNames, $userIsJunos : junos )
$pr_list : RecordSet( size > 0 ) from
collect( PRRecord( alwaysTrue == $userIsJunos || responsible memberOf $reports ) )
then
$user.setRecords($pr_list, DataSource.GNATS);
end
This triggers the bug, when asserting PRRecord objects, or User objects. Hopefully this will help.
> java.lang.ClassCastException: org.drools.rule.AbstractCompositeConstraint$MultiFieldOrConstraintContextEntry
> ------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-909
> URL: http://jira.jboss.com/jira/browse/JBRULES-909
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Reteoo
> Affects Versions: 4.0.0.MR3
> Reporter: Dirk Bergstrom
> Assigned To: Mark Proctor
>
> When asserting User objects into the a WM that has already had rules fired, I get this exception:
> java.lang.ClassCastException: org.drools.rule.AbstractCompositeConstraint$MultiFieldOrConstraintContextEntry
> at org.drools.rule.VariableRestriction.isAllowedCachedLeft(VariableRestriction.java:72)
> at org.drools.rule.VariableConstraint.isAllowedCachedLeft(VariableConstraint.java:72)
> at org.drools.rule.OrConstraint.isAllowedCachedLeft(OrConstraint.java:64)
> at org.drools.common.DoubleBetaConstraints.isAllowedCachedLeft(DoubleBetaConstraints.java:140)
> at org.drools.reteoo.CollectNode.assertTuple(CollectNode.java:137)
> at org.drools.reteoo.CompositeTupleSinkAdapter.propagateAssertTuple(CompositeTupleSinkAdapter.java:30)
> at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:155)
> at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:183)
> at org.drools.reteoo.Rete.assertObject(Rete.java:121)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:201)
> at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:70)
> at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:766)
> at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:578)
> at net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:265)
> at net.juniper.dash.data.UserSource.populateRecords(UserSource.java:234)
> at net.juniper.dash.Updater$DataSourceProcessor.work(Updater.java:177)
> at net.juniper.dash.Refresher.run(Refresher.java:69)
> I assert a bunch of Users (and a bunch of other objects), then fire the rules, then attempt to assert more Users, and I get this on the *second* User I assert.
--
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
More information about the jboss-jira
mailing list