[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1003) NullPointerException being thrown while removing a package from RuleBase
Sarika Khamitkar (JIRA)
jira-events at lists.jboss.org
Thu Jul 12 16:00:03 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1003?page=all ]
Sarika Khamitkar updated JBRULES-1003:
--------------------------------------
Description:
I get the following exception while removing a rule package from the RuleBase.
java.lang.NullPointerException
at org.drools.reteoo.CompositeObjectSinkAdapter.removeObjectSink(CompositeObjectSinkAdapter.java:125)
at org.drools.reteoo.ObjectSource.removeObjectSink(ObjectSource.java:123)
at org.drools.reteoo.ObjectTypeNode.removeObjectSink(ObjectTypeNode.java:297)
at org.drools.reteoo.ObjectTypeNode.remove(ObjectTypeNode.java:232)
at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:187)
at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:187)
at org.drools.reteoo.BetaNode.remove(BetaNode.java:185)
at org.drools.reteoo.BetaNode.remove(BetaNode.java:187)
at org.drools.reteoo.RuleTerminalNode.remove(RuleTerminalNode.java:439)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:135)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:259)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:408)
....
----------------------------------
A sample of the drl files:
package rule2392016206
import com.servlets.Record;
import com.servlets.Field;
import com.servlets.rules.RulesTrigger;
rule "Property damage"
when
rulesTrigger: RulesTrigger(clientID == 123, triggerType == 2)
record: Record(coreTypeIDList contains "123")
(Field (ID == 123, dateValue >= "04-Jul-2000") and Field (ID == 456, fieldValue > 10) )
then
rulesTrigger.sendEmail(2392016206L, record);
end
--------------------------
The NullPointerException occurs when I execute the following code.
ruleBase.removePackage("rule2392016206");
Before removing the package, I am iterating through all the packages in the ruleBase and I can see this package name in the list. One more thing I noticed was that if the number of packages in the ruleBase is lesss than 4, then the exception is not thrown.
I did not see this exception in 3.0.6.
was:
I get the following exception while removing a rule package from the RuleBase.
java.lang.NullPointerException
at org.drools.reteoo.CompositeObjectSinkAdapter.removeObjectSink(CompositeObjectSinkAdapter.java:125)
at org.drools.reteoo.ObjectSource.removeObjectSink(ObjectSource.java:123)
at org.drools.reteoo.ObjectTypeNode.removeObjectSink(ObjectTypeNode.java:297)
at org.drools.reteoo.ObjectTypeNode.remove(ObjectTypeNode.java:232)
at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:187)
at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:187)
at org.drools.reteoo.BetaNode.remove(BetaNode.java:185)
at org.drools.reteoo.BetaNode.remove(BetaNode.java:187)
at org.drools.reteoo.RuleTerminalNode.remove(RuleTerminalNode.java:439)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:135)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:259)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:408)
....
----------------------------------
A sample of the drl files:
package rule2392016206
import com.servlets.Record;
import com.servlets.Field;
import com.servlets.rules.RulesTrigger;
rule "Property damage"
when
rulesTrigger: RulesTrigger(clientID == 123, triggerType == 2)
record: Record(coreTypeIDList contains "123")
(Field (ID == 123, dateValue >= "04-Jul-2000") and Field (ID == 456, fieldValue > 10) )
then
rulesTrigger.sendEmail(2392016206L, record);
end
--------------------------
The NullPointerException occurs when I execute the following code.
ruleBase.removePackage("rule2392016206");
Before removing the package, I am iterating through all the packages in the ruleBase and I can see this package name in the list. One more thing I noticed was that if the number of packages in the ruleBase is lesss than 4, then the exception is not thrown.
> NullPointerException being thrown while removing a package from RuleBase
> ------------------------------------------------------------------------
>
> Key: JBRULES-1003
> URL: http://jira.jboss.com/jira/browse/JBRULES-1003
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Reteoo
> Affects Versions: 4.0.0.MR3
> Environment: Windows XP
> Reporter: Sarika Khamitkar
> Assigned To: Mark Proctor
>
> I get the following exception while removing a rule package from the RuleBase.
> java.lang.NullPointerException
> at org.drools.reteoo.CompositeObjectSinkAdapter.removeObjectSink(CompositeObjectSinkAdapter.java:125)
> at org.drools.reteoo.ObjectSource.removeObjectSink(ObjectSource.java:123)
> at org.drools.reteoo.ObjectTypeNode.removeObjectSink(ObjectTypeNode.java:297)
> at org.drools.reteoo.ObjectTypeNode.remove(ObjectTypeNode.java:232)
> at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:187)
> at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:187)
> at org.drools.reteoo.BetaNode.remove(BetaNode.java:185)
> at org.drools.reteoo.BetaNode.remove(BetaNode.java:187)
> at org.drools.reteoo.RuleTerminalNode.remove(RuleTerminalNode.java:439)
> at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:135)
> at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:259)
> at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:408)
> ....
> ----------------------------------
> A sample of the drl files:
> package rule2392016206
> import com.servlets.Record;
> import com.servlets.Field;
> import com.servlets.rules.RulesTrigger;
> rule "Property damage"
> when
> rulesTrigger: RulesTrigger(clientID == 123, triggerType == 2)
> record: Record(coreTypeIDList contains "123")
> (Field (ID == 123, dateValue >= "04-Jul-2000") and Field (ID == 456, fieldValue > 10) )
> then
> rulesTrigger.sendEmail(2392016206L, record);
> end
> --------------------------
> The NullPointerException occurs when I execute the following code.
> ruleBase.removePackage("rule2392016206");
> Before removing the package, I am iterating through all the packages in the ruleBase and I can see this package name in the list. One more thing I noticed was that if the number of packages in the ruleBase is lesss than 4, then the exception is not thrown.
> I did not see this exception in 3.0.6.
--
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