[rules-users] problem in rules 4.0.0.11754MR2

Mark Proctor mproctor at codehaus.org
Fri Jun 8 10:16:56 EDT 2007


The consequence will be null if the java you used is invalid. When you 
create the Package check the errors before adding it to the rule base as 
you can get a lot more info. In fact thats good "best practice" always 
verify that the package errors are emtpy before attempting to use the 
package.

Mark
Manukyan, Sergey wrote:
>
> 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
>
>  
>
> **********************
> ** LEGAL DISCLAIMER **
> **********************
>
> This E-mail message and any attachments may contain
> legally privileged, confidential or proprietary
> information. If you are not the intended recipient(s),
> or the employee or agent responsible for delivery of
> this message to the intended recipient(s), you are
> hereby notified that any dissemination, distribution
> or copying of this E-mail message is strictly
> prohibited. If you have received this message in
> error, please immediately notify the sender and
> delete this E-mail message from your computer.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070608/3be7ecbb/attachment.html 


More information about the rules-users mailing list