Re: [drools-user] NullPointerException

2006-12-11 Thread Edson Tirelli
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

Re: [drools-user] NullPointerException

2006-12-11 Thread Liliana Pasquale
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()

Re: [drools-user] NullPointerException

2006-12-11 Thread Michael Neale
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:

Re: [drools-user] NullPointerException

2006-12-11 Thread Liliana Pasquale
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

Re: [drools-user] NullPointerException

2006-12-11 Thread Steven Williams
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

[drools-user] NullPointerException

2006-12-11 Thread Liliana Pasquale
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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-14 Thread Michael Neale
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 > >

RE: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-14 Thread Ishafizan Ishak
> > 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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-14 Thread Khairul Anwar
> > 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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-14 Thread Michael Neale
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

RE: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Ishafizan Ishak
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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Khairul Anwar
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

RE: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Ishafizan Ishak
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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Khairul Anwar
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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Michael Neale
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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Khairul Anwar
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

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Michael Neale
can you post some more details? On 4/13/06, Khairul Anwar <[EMAIL PROTECTED]> wrote: > > yes, it is RC1. > >

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Khairul Anwar
yes, it is RC1.

Re: [drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-13 Thread Michael Neale
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);. > >

[drools-user] NullPointerException using builder.addPackagerFromDrl(source)

2006-04-12 Thread Khairul Anwar
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