RE: [rules-users] NPE on retract

2007-04-26 Thread Anstis, Michael \(M.\)
ules Users List Subject: Re: [rules-users] NPE on retract I'll try to create a self contained test. It may be a difficult task. The error seems to come and go depending on which other rules I leave in my rule set. In particular, there is another rule that has many

Re: [rules-users] NPE on retract

2007-04-25 Thread Edson Tirelli
Chris, My misunderstanding was that Drools used object identity with an IdentifyHashMap unless it was configured to use a regular HashMap. Is this not the case? Yes, it uses identity as default for regular assertions, but at the same time, it uses equality for the Truth Management System (

Re: [rules-users] NPE on retract

2007-04-25 Thread Chris West
I'll try to create a self contained test. It may be a difficult task. The error seems to come and go depending on which other rules I leave in my rule set. In particular, there is another rule that has many conditions and only logs a message as the consequence that when it is included in the rul

Re: [rules-users] NPE on retract

2007-04-24 Thread Edson Tirelli
Chris Can you provide a self contained test that shows the problem and open a JIRA with it? I will take a look in it. There is no requirement to define equals/hashcode, but if you do so, you need to make them time consistent, i.e., they cannot change during the time the object is asserte

Re: [rules-users] NPE on retract

2007-04-24 Thread Chris West
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 th

Re: [rules-users] NPE on retract

2007-04-24 Thread Mark Proctor
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.NullPointerExce

[rules-users] NPE on retract

2007-04-24 Thread Chris West
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.re