Bug 1021810
| Summary: | NoSuchMethodError at runtime due to eval in query (BW chaining) | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Mario Fusco <mfusco> |
| Component: | BRE | Assignee: | Mario Fusco <mfusco> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Marek Winkler <mwinkler> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.0.0 | ||
| Target Milestone: | ER5 | ||
| Target Release: | 6.0.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-08-06 20:15:41 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Verified on BRMS 6.0.0 ER5. |
- 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