[rules-dev] org.drools.rule.InvalidRulePackage: [0,-1]

Zevenbergen, Alex azevenbergen at paddypower.com
Mon Feb 23 09:34:49 EST 2009


Oops sorry about that rookie mistake, thanks for the info on Drools!

 

Alex

 

________________________________

From: rules-dev-bounces at lists.jboss.org
[mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Edson Tirelli
Sent: 23 February 2009 14:30
To: Rules Dev List
Subject: Re: [rules-dev] org.drools.rule.InvalidRulePackage: [0,-1]

 


   Drools 4 is tried and tested. Only the error message is not clear for
the uninitiated.

   The error message means that the Lexer found the end of the file
without finding a close character for a given token. In your case,
looking more carefully, a String:

settle_selection("test",20001","W");


    Drools 5 is in Milestone 5 now. Not recommended for production, but
stable enough for early adopters.

    []s
    Edson

2009/2/23 Zevenbergen, Alex <azevenbergen at paddypower.com>

Thanks for your answer, but I get the same with 'end'

 

Is the current release of drools 5 a stable one? I used 4 because I
assumed it would be 'tried and tested'

 

Thanks,

Alex

 

________________________________

From: rules-dev-bounces at lists.jboss.org
[mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Edson Tirelli
Sent: 23 February 2009 13:24
To: Rules Dev List
Subject: Re: [rules-dev] org.drools.rule.InvalidRulePackage: [0,-1]

 


   Lower case: 'end'.

   It seems this is a Drools 4 parser error message. In Drools 5 we have
much better error messages and they are documented.

   []s
   Edson

2009/2/23 Zevenbergen, Alex <azevenbergen at paddypower.com>

Hi all,

 

I'm just starting to use drools, I am using it to house the rules
regarding settlement of sports markets and such my rule packages should
be relatively simple and straight forward (ie when match winner = x then
settle x as winner)

 

However my first attempt to create a drl is failing with the following
error

 

org.drools.rule.InvalidRulePackage: [0,-1]: unknown:0:-1 mismatched
token: [@-1,0:0='<no text>',<-1>,0:-1]; expecting type END

 

and I cant find much documentation online to help solve it.

 

The complete drl file is:

 

package xxx..rules.tennis









 









import xxx.object.Fact









import java.util.HashMap









import function xxx.Settle_Selection.settle_selection









 









 









rule "Player 1 wins match"









        salience 100









        agenda-group "tennis"









        when









                $f : Fact()









 
eval(($f.details["END_MATCH"].toUpper().toString().equal("TRUE")))









        then









                settle_selection("test",20001","W");









END
 
 
 
Thanks in advance,
Alex

 


________________________________________________________________________
Privileged, confidential and/or copyright information may be contained
in this communication. This e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or entity
to whom they are addressed. If you are not the intended addressee, you
may not copy, forward, disclose or otherwise use this e-mail or any part
of it in any way whatsoever. To do so is prohibited and may be unlawful.
If you have received this email in error 
please notify the sender immediately.

Paddy Power PLC may monitor the content of e-mail sent and received for
the purpose of ensuring compliance with its policies and procedures.

Paddy Power plc, Airton House, Airton Road, Tallaght, Dublin 24
Registered in Ireland: 16956
________________________________________________________________________


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




-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com


________________________________________________________________________
Privileged, confidential and/or copyright information may be contained
in this communication. This e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or entity
to whom they are addressed. If you are not the intended addressee, you
may not copy, forward, disclose or otherwise use this e-mail or any part
of it in any way whatsoever. To do so is prohibited and may be unlawful.
If you have received this email in error 
please notify the sender immediately.

Paddy Power PLC may monitor the content of e-mail sent and received for
the purpose of ensuring compliance with its policies and procedures.

Paddy Power plc, Airton House, Airton Road, Tallaght, Dublin 24
Registered in Ireland: 16956
________________________________________________________________________


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




-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com


________________________________________________________________________
Privileged, confidential and/or copyright information may be contained in this communication. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you may not copy, forward, disclose or otherwise use this e-mail or any part of it in any way whatsoever. To do so is prohibited and may be unlawful. If you have received this email in error 
please notify the sender immediately.

Paddy Power PLC may monitor the content of e-mail sent and received for the purpose of ensuring compliance with its policies and procedures.

Paddy Power plc, Airton House, Airton Road, Tallaght, Dublin 24  Registered in Ireland: 16956
________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20090223/38473841/attachment.html 


More information about the rules-dev mailing list