[rules-users] rule not valid...

Manukyan, Sergey SManukyan at lear.com
Thu Jun 7 10:22:26 EDT 2007


Rahul,

Same thing happens when I run examples HelloWorld:

---

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:59
)
	at
org.drools.examples.HelloWorldExample.main(HelloWorldExample.java:20)


I am using JANINO compiler... How can I find out what exactly is the
problem?

Thanks,

-Sergey



-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Rahul Phadnis
Sent: Wednesday, June 06, 2007 4:56 PM
To: Rules Users List
Subject: Re: [rules-users] rule not valid...

You probably need a package definition at the top of
the file.

Please also import the SupplierView class in the rules
drl file.

You can also first test using the drools sample files.

-Rahul


--- "Manukyan, Sergey" <SManukyan at lear.com> wrote:

> 
> Folks,
> 
>  
> 
> I am using Rules 4.0 in WebSphere 6.0 app server.
> 
>  
> 
> Made a simple test file with a simple rule :
> 
>  
> 
> rule "Test"
> 
>       when
> 
>             cs : SupplierView()
> 
>       then
> 
>             System.out.println(cs);
> 
> end
> 
>  
> 
>  
> 
> But getting exception:
> 
>  
> 
>  
> 
> [6/6/07 16:13:06:456 EDT] 00000020 SystemErr     R
> java.lang.IllegalArgumentException: The rule called
> Test 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)
> 
>  
> 
>  
> 
>  
> 
> How can I check compile errors?? And what is not
> valid in this rule?
> 
>  
> 
> Thanks for any ideas...
> 
>  
> 
> -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
> 

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list