Liliana,
I think you got trunk in the middle of a change. Let me explain:
JBoss Rules 3.0 does not support multiple patterns inside "exists".
You can do exists only for a single pattern.
I'm implementing support for that in JBoss Rules 3.1 (trunk), but it
is not complete yet. This
I have modified the rules in this manner:
function boolean test(double n, double m) {
return (n < m);
}
rule "Regola3"
agenda-group"b2";
salience 3;
no-loop true;
when
f2 : ForAllManager( id == "b2") &&
n1 : NumberWrapper(id=="n1") &&
eval(test(n1.getValue()
its possible there is a NPE occurring in one of your consequences:
Exception in thread "main" org.drools.spi.ConsequenceException:
java.lang.NullPointerException at ...
worth while putting some checks in for nulls, see if that is it.
On 12/11/06, Liliana Pasquale <[EMAIL PROTECTED]> wrote:
Thank you for your help, but I get the same exceptions.
Liliana
2006/12/11, Steven Williams <[EMAIL PROTECTED]>:
Hi Liliana,
I don't know if it will fix your problem but you don't need the &&'s in
your rules. Rules are "and"ed by default.
ie.
when
f2 : ForAllManager( id == "b2") &&
n1 : Numb
Hi Liliana,
I don't know if it will fix your problem but you don't need the &&'s in your
rules. Rules are "and"ed by default.
ie.
when
f2 : ForAllManager( id == "b2") &&
n1 : NumberWrapper(id=="n1") &&
eval(n1.getValue() < 100)
should be:
when
f2 : ForAllManager( id == "b2")
n1 : NumberWrapper
Consider the following files :
1)Dynamo_rules_test.java
2)Manager.java
3) ForAllManager.java
4)BooleanWrapper.java
5)StringWrapper.java
6)NumberWrapper.java
-
and consider two simple rules:
rule "Regola 3"
agenda-group "b2";
salience 3;
no-loop
les not found. Expecting more like 'class not found' exception
> > >
> > > -Original Message-
> > > From: Khairul Anwar [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, April 14, 2006 12:27 PM
> > > To: user@drools.codehaus.org
> >
> > Hi,
> > > Can u try a simple helloWorld rule call (or a rule that u worked on
> and
> > > works) ? Ie public final static String AUTH_RULE_FILE_LOGIN =
> > > "myHelloWorld.drl"...then do a readRule(), plus could use the eclipse
> > > debugger to
> > Just that it's kinda weird that 'null pointer' exceptions is displayed
> if
> > jar files not found. Expecting more like 'class not found' exception
> >
> > -Original Message-
> > From: Khairul Anwar [mailto:[EMAIL PROTEC
n do a readRule(), plus could use the eclipse
> > debugger to see where it fails too.
> >
> >
> >
> > -----Original Message-
> > From: Khairul Anwar [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 14, 2006 11:20 AM
> > To: user@drools.codehaus.org
not found' exception
-Original Message-
From: Khairul Anwar [mailto:[EMAIL PROTECTED]
Sent: Friday, April 14, 2006 12:27 PM
To: user@drools.codehaus.org
Subject: Re: [drools-user] NullPointerException using
builder.addPackagerFromDrl(source)
Hi, just got it solved. Never thought that the exce
ROTECTED]
> Sent: Friday, April 14, 2006 11:20 AM
> To: user@drools.codehaus.org
> Subject: Re: [drools-user] NullPointerException using
> builder.addPackagerFromDrl(source)
>
> Here it is. Is it any possibilities the exception is caused by drl file?
> If
irul Anwar [mailto:[EMAIL PROTECTED]
Sent: Friday, April 14, 2006 11:20 AM
To: user@drools.codehaus.org
Subject: Re: [drools-user] NullPointerException using
builder.addPackagerFromDrl(source)
Here it is. Is it any possibilities the exception is caused by drl file? If
any object used in drl file is
Here it is. Is it any possibilities the exception is caused by drl file? If
any object used in drl file is null, the exception will be thrown at
workingMemory.assertObject() right?
Sorry, a total newbie here.
#list any import classes here.
import com.Session
import com.SystemConfig
import com.Aut
Can you also post the rule(s) you are trying to run?
On 4/13/06, Khairul Anwar <[EMAIL PROTECTED]> wrote:
>
> here is the code
>
>private static RuleBase ruleBase;
> public final static String AUTH_RULE_FILE_LOGIN = "
> ruleAuthorization.drl
> ";
>
> RuleAuthorization()
> {
> W
here is the code
private static RuleBase ruleBase;
public final static String AUTH_RULE_FILE_LOGIN = "ruleAuthorization.drl
";
RuleAuthorization()
{
WorkingMemory workingMemory = null;
if (ruleBase != null) {
System.out.println("rulebase not null : "+ ruleB
can you post some more details?
On 4/13/06, Khairul Anwar <[EMAIL PROTECTED]> wrote:
>
> yes, it is RC1.
>
>
yes, it is RC1.
I assume you are using RC1?
On 4/13/06, Khairul Anwar <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm currently working on Eclipse3.1+JbossServer+JbossRules. I use
> PackageBuilder to
> add the source(from Reader), but somehow it throws a NullPointerException
> at
> builder.addPackageFromDrl(source);.
>
>
Hi, I'm currently working on Eclipse3.1+JbossServer+JbossRules. I use
PackageBuilder to
add the source(from Reader), but somehow it throws a NullPointerException at
builder.addPackageFromDrl(source);.
13:56:19,484 INFO [STDOUT] java.lang.NullPointerException
13:56:19,484 INFO [STDOUT] at
org
20 matches
Mail list logo