Bug 1021810 - NoSuchMethodError at runtime due to eval in query (BW chaining)
Summary: NoSuchMethodError at runtime due to eval in query (BW chaining)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-22 07:13 UTC by Mario Fusco
Modified: 2014-08-06 20:15 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:15:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-178 0 Critical Resolved NoSuchMethodError at runtime due to eval in query (BW chaining) 2013-12-12 17:24:08 UTC

Description Mario Fusco 2013-10-22 07:13:44 UTC
- Workaround Description:

The types of the query arguments has to be coherent with the declarations so either rewrite the query signature like:

query isTriple( int $a, int $b, int $c )

or change the patterns in the query itself like:

Integer( this == $a )

- Steps to Reproduce:

Compile and start session from KB.

rule "kickoff"
salience 100
when
then
for( Integer i: new Integer[]
{3,4,5,12,13 }

)
{ insert( i ); }

end

rule "find triple forward"
when
Integer( $a: intValue )
Integer( $b: intValue > $a )
Integer( $c: intValue > $b )
eval( $a*$a + $b*$b == $c*$c )
then
System.out.println( "fwd: " + $a + " " + $b + " " + $c );
end

query isTriple( Integer $a, Integer $b, Integer $c )
Integer( intValue == $a )
Integer( intValue == $b && > $a )
Integer( intValue == $c && > $b )
eval( $a*$a + $b*$b == $c*$c )
end

rule "find triple backward"
when
isTriple( $a, $b, $c; )
then
System.out.println( "bwd: " + $a + " " + $b + " " + $c );
end

Comment 3 Marek Winkler 2013-12-12 17:29:10 UTC
Verified on BRMS 6.0.0 ER5.


Note You need to log in before you can comment on or make changes to this bug.