Hi,

I'm having an issue with the following rule NOT evaluating properly when
fired from a rulebase/package built on a web container vs. directly in
something like eclipse:

rule "Test Rule"
no-loop true
when
Customer( $name : name, $city : city )
Customer( ($name == "john" || $city == "la") )
then
System.out.println("you qualified");
end


For some reason when I run this rule on a standalone test class (with name
set to "john") it seems to fire and i get the "you qualified" printed out.
But the same exact rule, which I have configured to be accessable to fire
from within my web application does fire, but will not evaluate to true. I
have the same exact code building the package in both situations, same jars
and same Customer fact being asserted into session. The only difference I
can tell so far is classloaders that was used to load the standalone vs the
webapp PackageBuilder config.

From standalone (run from eclipse), I have the following:

PackageBuilderConfiguration
 - Compiler set to: 1 (JANINO)
 - JavaLanguage set to: 1.4
 - classloader: sun.misc.Launcher$AppClassLoader

From webapp, I have the following for config;

 - Compiler set to: 1 (JANINO)
 - JavaLanguage set to: 1.4
 - classloader: WebappClassLoader
 delegate: false
 repositories:
   /WEB-INF/classes/
----------> Parent Classloader:
[EMAIL PROTECTED]

I'm running Tomcat 5.52 on JVM1.5.0_11-b03

I've tried searching everywhere and can't seem to figure out what's going
on. My only guess is maybe I have some extra jar loaded in my web container
or maybe they are loaded in the wrong order. Any pointers would be great -
been at this for the whole day.

Thanks for your time,
Thong
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to