Red Hat Bugzilla – Bug 1271534
drools-compiler fails to report error for invalid rule with field binding
Last modified: 2015-11-11 11:30:47 EST
Created attachment 1082744 [details] pojo which contains Message class Description of problem: Validation on business-central does not alert drl error which BRMS 5.3.1 and JBDS 8.1 does. Version-Release number of selected component (if applicable): 6.1.3 Steps to Reproduce: Please proceed all of instructions on business-central 1: upload the attached reproducer-0.0.1-SNAPSHOT.jar into artifact repository 2: create a new project 3: set project's dependency to reproducer-0.0.1-SNAPSHOT.jar 3: create a new package "com.sample" 4: create a new drl which looks like attached reproducer.drl 5: click validate Actual results: Although attribute of Message, "bra", is not defined in the Class, validation does not alert any error. Expected results: Validate fails. Additional info: With JBoss developer Studio 8.1, following error message will be displayed on the console: === BuildError: Unable to create Field Extractor for 'bra'Field/method 'bra' not found for class 'com.sample$Message' Sample.drl /reproducerProject/src/main/resources/rules line 7 Drools Error === Also with guvnor comes with BRMS 5.3.1, validation works as expected too.
Created attachment 1082746 [details] sample drl as reproducer
Fixed by https://github.com/droolsjbpm/drools/commit/ce7e91825e64b49b74b5d3db3b9df960bd4e4439
For completeness, here is the cherry-pick on 6.3.x branch: https://github.com/droolsjbpm/drools/commit/59a304aee6ec3ca835457a1a654bebfcf2f7b929
Verified in 6.2.0.ER5. The verification fails. Also the new test created by mentioned commit passes.
Sorry for confusion. I meant the validation fails. From the "steps to reproduce."