[rules-users] Error: unable to resolve method

Wolfgang Laun wolfgang.laun at gmail.com
Mon Jan 4 05:15:48 EST 2010


On Mon, Jan 4, 2010 at 10:46 AM, xalperte <javier.alperte at rudder-tech.com>wrote:

>
>
> Wolfgang Laun-2 wrote:
> >
> > Try
> > (a) declaring parameters days and percentage as Integer
> > (b) keep the function as is, but remove dialect "mvel" from the rule.
> >
>
> Hi, thank you for your quick response.
>
> I'm using Drools 5.0.1 in JBoss AS 4.2.3.
>
> I've tested the two options with the following results:
>
> b) Changing the dialect from mvel to java: Runs OK!
>

So, does this solve your predicament, at least, temporarily?



> a) Change the parameters signature from int to Integer throws the following
> exception:
>

Avoiding literals and declaring two int's on the RHS might be worth another
try,
if you really need mvel,

int d = ...;
int p =...;
addBookingPayment($request, d, p );

-W


>
> org.drools.runtime.rule.ConsequenceException: [Error: unable to resolve
> method:
>
> kobo.regularSafaris.AddBookingPayment.addBookingPayment(kobo.regularSafaris.BookingRequest,
> java.lang.Integer, java.lang.Integer) [arglength=3]]
> [Near : {... Unknown ....}]
>             ^
> [Line: 1, Column: 0]
>        at
>
> org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100104/83aa9b78/attachment.html 


More information about the rules-users mailing list