Bug 1021810 - NoSuchMethodError at runtime due to eval in query (BW chaining)
NoSuchMethodError at runtime due to eval in query (BW chaining)
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ER5
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-22 03:13 EDT by Mario Fusco
Modified: 2014-08-06 16:15 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:15:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-178 Critical Resolved NoSuchMethodError at runtime due to eval in query (BW chaining) 2013-12-12 12:24:08 EST

  None (edit)
Description Mario Fusco 2013-10-22 03:13:44 EDT
- 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 12:29:10 EST
Verified on BRMS 6.0.0 ER5.

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