Mark,
The object being retracted currently has no hashcode and equals, therefore defaulting to the ones on Object. The reason I'm even retracting the object is so that I can assert it again to work around bug
http://jira.jboss.com/jira/browse/JBRULES-614. Therefore the reason I am retracting the object is because it has changed.
Is there a requirement to implement hashcode and equals? If so, does it have to be based on all fields of the pojo? My intent was to implement hashcode and equals, but only base them on the id fields of the class.
-Chris
Have you correctly implemented your equals and hashcode? Have you made sure that the objects fields haven't changed between the assert and the retract?
Mark
Chris West wrote:Hi,
Using version 3.0.6 of jboss rules, while retracting an object, I get the following:
java.lang.NullPointerException
at org.drools.reteoo.beta.InstanceEqualConstrRightMemory.remove(Unknown Source)
at org.drools.reteoo.BetaMemory.remove (Unknown Source)
at org.drools.reteoo.NotNode.retractObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateRetractObject(Unknown Source)
at org.drools.reteoo.RightInputAdapterNode.retractTuple (Unknown Source)
at org.drools.reteoo.TupleSource.propagateRetractTuple(Unknown Source)
at org.drools.reteoo.NotNode.retractTuple(Unknown Source)
at org.drools.reteoo.TupleSource.propagateRetractTuple (Unknown Source)
at org.drools.reteoo.JoinNode.retractObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateRetractObject(Unknown Source)
at org.drools.reteoo.ObjectTypeNode.retractObject (Unknown Source)
at org.drools.reteoo.Rete.retractObject(Unknown Source)
at org.drools.reteoo.ReteooRuleBase.retractObject(Unknown Source)
at org.drools.reteoo.ReteooWorkingMemory.doRetract(Unknown Source)
at org.drools.common.AbstractWorkingMemory.retractObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.retractObject(Unknown Source)
at ascc.rules.AbstractRulesCoordinator.statusChanged(AbstractRulesCoordinator.java :354)
at ascc.rules.AbstractRulesCoordinator$1.statusChanged(AbstractRulesCoordinator.java:111)
at ascc.status.BaseStatusBoard.notifyChange(BaseStatusBoard.java:211)
at ascc.status.BaseStatusBoard.notifyChange (BaseStatusBoard.java:191)
at ascc.status.DefaultParkingStatusBoard.empty(DefaultParkingStatusBoard.java:318)
at ascc.spotting.DefaultSpottingCoordinator.computeInitialSpot(DefaultSpottingCoordinator.java:578)
at ascc.spotting.DefaultSpottingCoordinator.statusCreated(DefaultSpottingCoordinator.java:827)
at ascc.status.BaseStatusBoard.notifyCreate(BaseStatusBoard.java:100)
at ascc.status.BaseStatusBoard.notifyCreate (BaseStatusBoard.java:80)
at ascc.status.DefaultAirPlanStatusBoard.missionAssignmentComplete(DefaultAirPlanStatusBoard.java:479)
at ascc.missionassignment.Rule_6___Complete_mission_assignment_for_event_0.consequence (Rule_6___Complete_mission_assignment_for_event_0.java:36)
at ascc.missionassignment.Rule_6___Complete_mission_assignment_for_event_0ConsequenceInvoker.evaluate(Rule_6___Complete_mission_assignment_for_event_0ConsequenceInvoker.java:24)
... 7 more
Is there something I could be doing wrong? Is this a known bug?
Thanks,
-Chris
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users