This seems to be a bug in Drools, a regression introduced into 5.5.0;
it compiles in 5.[34].0
The rule uses the custom operator supersetOf, both operands are
java.util.Collection.
//Results in a null pointer exception: Error: java.lang.NullPointerException
$test2: ArrayList()
from collect (DummyTest (sentence.intentions supersetOf
external.intentions))
The stack trace:
Exception in thread "main" java.lang.NullPointerException
at
org.drools.rule.builder.MVELConstraintBuilder.buildVariableConstraint(MVELConstraintBuilder.java:90)
at
org.drools.rule.builder.PatternBuilder.addConstraintToPattern(PatternBuilder.java:823)
at
org.drools.rule.builder.PatternBuilder.addConstraintToPattern(PatternBuilder.java:736)
at
org.drools.rule.builder.PatternBuilder.buildRelationalExpression(PatternBuilder.java:721)
at org.drools.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:673)
at org.drools.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:657)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:629)
at
org.drools.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:477)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:302)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:123)
at org.drools.rule.builder.CollectBuilder.build(CollectBuilder.java:43)
at org.drools.rule.builder.CollectBuilder.build(CollectBuilder.java:32)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:293)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:123)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:67)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:84)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2830)
at org.drools.compiler.PackageBuilder.compileRules(PackageBuilder.java:970)
at org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:879)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:871)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:466)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:694)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
at hezi.Main.setup(Main.java:77)
at hezi.Main.main(Main.java:129)
Cheers
-W
On 03/08/2013, hezis <hezis(a)delegatecom.com> wrote:
the error I describes in a compilation error in the IDE and not in
runtime
so
there is no stack trace other than the Error:
java.lang.NullPointerException
error indicated in the eclipse markers tab.
If testing this in runtime can spread light on the matter i will do so (it
will take some time to get it set)
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-java-lang-NullPointerExcept...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users