Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1078839

Summary: Guided rule with DSL is not able to build (ERR102) on ibm16
Product: [Retired] JBoss BRMS Platform 6 Reporter: Sona Mala <smala>
Component: Business CentralAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.1CC: kverlaen, lpetrovi, mwinkler, rrajasek, rzhang
Target Milestone: ER3   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
ibm jdk 6
Last Closed: 2014-08-06 19:54:44 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:
Attachments:
Description Flags
Unit test illustrating the DSL parsing problem
none
Unit test reproducing backward incompatibility none

Description Sona Mala 2014-03-20 11:47:54 UTC
Description of problem:
Our project which we use for testing is not able to build on ibm 16. It brokes all test scenarios. Build failed with:
	
|[ERR 102] Line 4:15 mismatched input 'equals' in rule "thirdRule" | thirdRule.rdslr | 0 | 4 |

but this rule (guvnor/model/cheese) is valid.

Same rule makes problem in other jdk (open, sun) but problem is quite different. Validation fails with same error but build success.

Unfortunately, we are not able to reproduce this issue outside this project.


Version-Release number of selected component (if applicable):
6.0.1 ER2 BPMS


How reproducible:
ibm16 SR6 (IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr6-20090923_42924 (JIT enabled, AOT enabled) )


Steps to Reproduce (ibm16):
1. clone repository to bussines-central (mention in comment 1)
2. go to Project Authoring
4. show Project Editor for project "guvnor"
5. build this project
6. show and validate corrupt rule

Actual results:
Step 5: Build failed with error which was mention in description.
Step 6: Validation success.


Expected results:
If validation is successful then build should be successful too.



Additional info:
affected rule is in package (guvnor/model/cheese)

Comment 2 Sona Mala 2014-03-20 13:36:23 UTC
If project contains some corrupted assets, please can you write here why this problem was occured?

Comment 3 Marek Winkler 2014-03-27 15:22:48 UTC
Created attachment 879525 [details]
Unit test illustrating the DSL parsing problem

Attaching a simple test illustrating the DSL parsing problem on the engine level. If you swap the two DSL lines, the test will succeed. Is this the intended behaviour?

This problem is not limited to the ibm jdk.

Comment 4 Mario Fusco 2014-03-27 16:38:59 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/1fe0f6d9a

Comment 5 Mario Fusco 2014-03-27 16:40:30 UTC
Cherry-picked to 6.0.x with https://github.com/droolsjbpm/drools/commit/67035fa49

Comment 6 Marek Winkler 2014-05-12 12:09:41 UTC
Created attachment 894669 [details]
Unit test reproducing backward incompatibility

Comment 7 Marek Winkler 2014-05-12 12:25:31 UTC
Unfortunately, the fix has broken backward compatibility (existing DSLs written for 6.x could stop working in 6.0.2), please see the attached unit test. 

I am not sure how to solve this problem properly, perhaps using a more sophisticated data structure (e.g. a trie) could help, but I feel the solution seems to be getting more complicated than we thought.

We would prefer either to solve this problem completely, or revert the previous fix. What do you think?

Comment 8 Mario Fusco 2014-05-13 15:36:32 UTC
Reverted on master by https://github.com/droolsjbpm/drools/commit/e1f7fa92f and cherry-picked to 6.0.x branch with https://github.com/droolsjbpm/drools/commit/ab1cd8ddc

Comment 9 Marek Winkler 2014-06-06 13:41:24 UTC
Verified on BRMS 6.0.2 ER3.