Hi,
I am using JBoss Rules 4.0.0.11754MR2 in an RAD 7.0 (Eclipse 3.2) environment.
Cannot make it work, even examples…
Here is a message produces on all rules: The rule called <here goes rule name> is not valid. Check for compile errors reported.
Here is a full stack trace:
Exception in thread "main" java.lang.IllegalArgumentException: The rule called Hello World is not valid. Check for compile errors reported.
at org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:363)
at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:263)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:293)
at org.drools.examples.HelloWorldExample.readRule(HelloWorldExample.java:72)
at org.drools.examples.HelloWorldExample.main(HelloWorldExample.java:21)
After digging it further I found that in Rule class method isValid is being called defiend as followes:
public boolean isValid() {
if ( this.consequence == null || !isSemanticallyValid() ) {
return false;
}
return true;
}
The debugger shows that this.consequence is null always! So rules are always not valid.
Anyone saw this problem? Any idea how to resolve it?
Thanks a lot!
-Sergey