Bug 1310685

Summary: [one-off ](6.2.1) Kie-scanner fails to update kiebase if a modified rule makes reference to a global defined in a .gdrl file.
Product: [Retired] JBoss BRMS Platform 6 Reporter: Alessandro Lazarotti <alazarot>
Component: BREAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Petrlik <jpetrlik>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: dmurphy, jpetrlik, lpetrovi, mfusco, mwinkler, tradej
Target Milestone: CR1   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
PATCH NAME: BZ-1310685 PRODUCT NAME: Red Hat JBoss BRMS Red Hat JBoss BPM Suite VERSION: 6.2 Update 1 SHORT DESCRIPTION: Kie-scanner fails to update kiebase if a modified rule makes reference to a global defined in a .gdrl file LONG DESCRIPTION: When converting an .xls file to a GDT, globals defined in the spreadsheet are stored in a .gdrl file in the same package. However, if an update is made to values in the decision table and the project is built/deployed, applications running a kie-scanner will fail to deploy the kiebase with an error. INSTALL REQUIREMENT: Red Hat JBoss BRMS 6.2 Update 1 or Red Hat JBoss BPM Suite 6.2 Update 1 is required MANUAL INSTALL INSTRUCTIONS FOR ALL PLATFORMS: 1. Backup and remove the following jar: $SERVER_DEPLOYMENT_DIR/business-central.war/WEB-INF/lib/drools-compiler-6.3.0.Final-redhat-7.jar $SERVER_DEPLOYMENT_DIR/kie-server.war/WEB-INF/lib/drools-compiler-6.3.0.Final-redhat-7.jar 2. Unzip the file jboss-bxms-6.2.1-BZ-1310685.zip and copy: BZ-1310685/drools-compiler-6.3.0.Final-redhat-7-BZ1310685.jar to: $SERVER_DEPLOYMENT_DIR/business-central.war/WEB-INF/lib $SERVER_DEPLOYMENT_DIR/kie-server.war/WEB-INF/lib ADDITIONAL INSTALL INSTRUCTIONS FOR ALL PLATFORMS: Find and replace drools-compiler-6.3.0.Final-redhat-7.jar with the patched drools-compiler-6.3.0.Final-redhat-7-BZ1310685.jar for all occurences of that file in your project. MANUAL INSTALL INSTRUCTIONS FOR MAVEN BASED PROJECTS: 1. Extract the attached zip (jboss-bxms-6.2.1-BZ-1310685.zip) and change into the BZ-1310685 directory 2. Run the following commands to install the patch binaries to the local maven repository: $ mvn install:install-file -Dfile=drools-compiler-6.3.0.Final-redhat-7-BZ1310685.jar -Dsources=drools-compiler-6.3.0.Final-redhat-7-BZ1310685-sources.jar -DgroupId=org.drools -DartifactId=drools-compiler -Dversion=6.3.0.Final-redhat-7-BZ1310685 -DpomFile=drools-compiler-6.3.0.Final-redhat-7-BZ1310685.pom -Dpackaging=jar 3. Override the original version of modified jars explicitly declaring them in <dependencyManagement> of your project pom.xml: <dependency> <groupId>org.drools</groupId> <artifactId>drools-compiler</artifactId> <version>6.3.0.Final-redhat-7-BZ1310685</version> </dependency> CREATOR: Alessandro Lazarotti DATE: 22-Feb-2016
Story Points: ---
Clone Of: 1310261 Environment:
Last Closed: 2016-03-03 13:23: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:
Bug Depends On: 1310261, 1310884    
Bug Blocks:    
Attachments:
Description Flags
patch
none
patch none

Comment 2 Mario Fusco 2016-02-22 14:22:44 UTC
Fix cherry-picked to 6.3.x branch with https://github.com/droolsjbpm/drools/commit/bd3109437

Comment 3 Alessandro Lazarotti 2016-02-22 21:52:48 UTC
Created attachment 1129507 [details]
patch

md5sum jboss-bxms-6.2.1-BZ-1310685.zip 
9156ec8028d3dc8b77a827dd696ed26f  jboss-bxms-6.2.1-BZ-1310685.zip

Comment 5 Jiri Petrlik 2016-02-24 14:53:25 UTC
The patch was built from wrong branch. It was built using branch 6.2.x of droolsjbpm/drools repository. However the patch is for BxMS 6.2.1 (see BZ header), which is on branch 6.3.x of drools repository. The commit with fix is also present on branch 6.3.x.

Comment 6 Alessandro Lazarotti 2016-02-29 13:48:19 UTC
In fact it was built on top a new branch created from the tag "BxMS-6.2.1.GA" - so community 6.3.x.
See here the tag from Ant Stephenson:
https://code.engineering.redhat.com/gerrit/gitweb?p=droolsjbpm%2Fdrools.git;a=shortlog;h=refs%2Fheads%2FBZ-1310820

see also above the jenkins tag "bsync-6.3.x-2016.01.29"  

From that tag I pushed the new branch where the patch was built.

Is that ok ?

Comment 7 Jiri Petrlik 2016-02-29 14:28:20 UTC
The problem is that jars in patch do not match with version in tag. The pom.xml [1] in commit uses version "6.3.0.Final-redhat-7", but the patch contains jars for "6.2.0.Final-redhat-6". For example "drools-core-6.2.0.Final-redhat-6-BZ1227056.jar". It seems to me that the patch was built using different tag? Or wrong jars were attached to patch?

[1] https://code.engineering.redhat.com/gerrit/gitweb?p=droolsjbpm/drools.git;a=blob;f=pom.xml;h=10d48f0fbb4f3aef6ad071dd875da91673d6e56a;hb=b3557a674a72c3c49c88da0ffdcbd3d67c619e15#l8

Comment 8 Alessandro Lazarotti 2016-02-29 14:40:20 UTC
Created attachment 1131569 [details]
patch

md5sum jboss-bxms-6.2.1-BZ-1310685.zip 
9156ec8028d3dc8b77a827dd696ed26f  jboss-bxms-6.2.1-BZ-1310685.zip

Comment 9 Alessandro Lazarotti 2016-02-29 14:41:31 UTC
ah, sorry that was a wrong jar.
My bad, the correct one is now attached.

Comment 10 Jiri Petrlik 2016-03-03 10:05:40 UTC
The patch was verified using reproducer for BZ#1310261 and regression tests passed successfully. This patch is ready for release.

patch md5sum - 9156ec8028d3dc8b77a827dd696ed26f

Note: It is important to note, that it is necessary to use patched drools-compiler-6.3.0.Final-redhat-7-BZ1310685.jar also while building client applications which use kjar with rules.

Comment 11 Alessandro Lazarotti 2016-03-03 13:23:41 UTC
Thanks Jiri,
I added the note:
 "Find and replace drools-compiler-6.3.0.Final-redhat-7.jar with the patched drools-compiler-6.3.0.Final-redhat-7-BZ1310685.jar for all occurrences of that file in your project." due that.

I am uploading it to support ticket right now.