[JBoss JIRA] Created: (JBRULES-2846) NPE in RuleTerminalNode when maintainTMS is false
by Nathan Bell (JIRA)
NPE in RuleTerminalNode when maintainTMS is false
-------------------------------------------------
Key: JBRULES-2846
URL: https://issues.jboss.org/browse/JBRULES-2846
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.1.1.FINAL
Environment: NA
Reporter: Nathan Bell
Assignee: Mark Proctor
Priority: Minor
copied from my email to rules-dev:
I am pretty sure this is a bug, but would like confirmation from people more familiar with the code base. My tests seem to show that RuleTerminalNode can cause an NPE on two different lines of code. Both places where a call is made to "workingMemory.getTruthMaintenanceSystem()" in that class can result in a null pointer exception if the "maintainTms" option is false. In my case I discovered the issue in some unit tests where I am calling "knowledgeBase.removeKnowledgePackage" which ends up (eventually) in RuleTerminalNode. I have pasted an example stack trace below:
Thread [main] (Suspended (exception NullPointerException))
RuleTerminalNode$RTNCleanupAdapter.cleanUp(LeftTuple, InternalWorkingMemory) line: 519
ObjectTypeNode.doRemove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 347
ObjectTypeNode.remove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 325
AlphaNode(ObjectSource).doRemove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 209
AlphaNode(BaseNode).remove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 109
LeftInputAdapterNode.doRemove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 187
LeftInputAdapterNode(BaseNode).remove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 109
RuleTerminalNode.doRemove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 411
RuleTerminalNode(BaseNode).remove(RuleRemovalContext, ReteooBuilder, BaseNode, InternalWorkingMemory[]) line: 109
ReteooBuilder.removeRule(Rule) line: 237
ReteooRuleBase.removeRule(Rule) line: 432
ReteooRuleBase(AbstractRuleBase).removeRule(Package, Rule) line: 831
ReteooRuleBase(AbstractRuleBase).removePackage(String) line: 751
KnowledgeBaseImpl.removeKnowledgePackage(String) line: 201
(I redacted the stack after the call to removeKnowledgePackage() because it provides no value in this discussion)
I am using Drools 5.1.1. I have also looked at the latest version of the code here:
https://github.com/droolsjbpm/droolsjbpm/blob/master/drools-core/src/main...
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (JBRULES-2676) When rebuilding from source with -Declipse option on OSX / Linux systems, the Eclipse tar.gz file is unnecessarily reloaded
by Lawrence Terrill (JIRA)
When rebuilding from source with -Declipse option on OSX / Linux systems, the Eclipse tar.gz file is unnecessarily reloaded
----------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2676
URL: https://jira.jboss.org/browse/JBRULES-2676
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-eclipse
Affects Versions: FUTURE
Environment: Occurs on family 'mac' and 'unix' systems where the eclipse file download extension is 'tar.gz' format, instead of 'zip' as on Windows
Reporter: Lawrence Terrill
Assignee: Mark Proctor
Priority: Minor
When building the eclipse component from source, the eclipse tar.gz file is repeatedly downloaded despite a check for the file's existance. In the file drools-eclipse/drools-eclipse-build/setupEclipse.xml, target 'checkEclipseJar', the existance of the file is checked. But this check is hardcoded with the file extension '.zip'. It likely should have used the symbolic '${download.extension}' used in the 'getEclipseJar' target in the same file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (JBRULES-2547) NullPointerException in ObjectFactory$ObjectEqualEvaluator in 4.0.7
by Eduardo Oré (JIRA)
NullPointerException in ObjectFactory$ObjectEqualEvaluator in 4.0.7
-------------------------------------------------------------------
Key: JBRULES-2547
URL: https://jira.jboss.org/browse/JBRULES-2547
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.7
Reporter: Eduardo Oré
Assignee: Mark Proctor
I have a NullPointerException in ObjectEqualEvaluator.evaluate() when trying to make a retract.
Caused by: java.lang.NullPointerException
at org.drools.base.com.amadeus.jcp.standard.business.ruleservice.policyapplication.facts.hotel.PreferredRoom22074433$getRoom.getValue(Unknown Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)
at org.drools.base.evaluators.ObjectFactory$ObjectEqualEvaluator.evaluate(ObjectFactory.java:130)
at org.drools.util.AbstractHashTable$DoubleCompositeIndex.equal(AbstractHashTable.java:669)
at org.drools.util.FactHandleIndexHashTable$FieldIndexEntry.matches(FactHandleIndexHashTable.java:379)
at org.drools.util.FactHandleIndexHashTable.remove(FactHandleIndexHashTable.java:200)
at org.drools.reteoo.JoinNode.retractObject(JoinNode.java:180)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateRetractObject(CompositeObjectSinkAdapter.java:375)
at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:189)
at org.drools.reteoo.Rete.retractObject(Rete.java:215)
at org.drools.reteoo.ReteooRuleBase.retractObject(ReteooRuleBase.java:211)
at org.drools.reteoo.ReteooWorkingMemory.doRetract(ReteooWorkingMemory.java:79)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1023)
at org.drools.base.DefaultKnowledgeHelper.retract(DefaultKnowledgeHelper.java:122)
at com.amadeus.act.hotel.Rule_Company_policy__preferred_Room_without_rate_code_policies_0.consequence(Rule_Company_policy__preferred_Room_without_rate_code_policies_0.java:18)
at com.amadeus.act.hotel.Rule_Company_policy__preferred_Room_without_rate_code_policies_0ConsequenceInvoker.evaluate(Rule_Company_policy__preferred_Room_without_rate_code_policies_0ConsequenceInvoker.java:25)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (JBRULES-2493) Drools does not make use of the PropertyChangeListeners on my objects
by Tamas Cserveny (JIRA)
Drools does not make use of the PropertyChangeListeners on my objects
---------------------------------------------------------------------
Key: JBRULES-2493
URL: https://jira.jboss.org/jira/browse/JBRULES-2493
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.1.FINAL
Environment: Eclipse RCP
Reporter: Tamas Cserveny
Assignee: Mark Proctor
Hi,
I've asserted an object with the relevant add and remove methods for the change support, but drools did not subscribe to property changes.
I've used StatefulKnowledgeSession's insert method for this.
After some minutes it turned out, that the insert method delegates the call to the ReteooWorkingMemory with dynamic property set to false.
It might be that this is the reason why they were not picked up.
Cheers,
Tamas
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (JBRULES-2484) Unsupported brackets in right operator
by Jeremy Ary (JIRA)
Unsupported brackets in right operator
--------------------------------------
Key: JBRULES-2484
URL: https://jira.jboss.org/jira/browse/JBRULES-2484
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.1.0.M1, 5.0.1.FINAL
Reporter: Jeremy Ary
Assignee: Mark Proctor
Class QueueList has two properties:
private QueueIds idList; //QueueIds just extends HashMap<String, Integer>
private Collection<Integer> queueIds;
rule "testing"
when
QueueList ( queueIds contains idList["ABC"] )
then
System.out.println("testing fired");
end
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.drools.rule.builder.PatternBuilder.buildRestriction(PatternBuilder.java:888)
at org.drools.rule.builder.PatternBuilder.buildRestriction(PatternBuilder.java:717)
at org.drools.rule.builder.PatternBuilder.createRestriction(PatternBuilder.java:504)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:351)
at org.drools.rule.builder.PatternBuilder.buildConstraint(PatternBuilder.java:239)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:196)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:104)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:68)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1159)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:649)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
at com.sample.DroolsTest.createKnowledgeBase(DroolsTest.java:47)
at com.sample.DroolsTest.main(DroolsTest.java:19)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months