Bug 1293965 - [One-Off Patch] (6.1.4) kie-ci-osgi Activator doesn't register the ClassLoaderResolver on the ServiceRegistry
[One-Off Patch] (6.1.4) kie-ci-osgi Activator doesn't register the ClassLoade...
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Fuse Integration (Show other bugs)
All All
high Severity high
: ---
: One-off release
Assigned To: Mario Fusco
Jiri Petrlik
Petr Penicka
Depends On: 1293455
  Show dependency treegraph
Reported: 2015-12-23 13:20 EST by Alessandro Lazarotti
Modified: 2016-02-22 17:06 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
PATCH NAME: BZ-1293965 PRODUCT NAME: Red Hat JBoss BRMS Red Hat JBoss BPM Suite VERSION: 6.1 Update 4 SHORT DESCRIPTION: kie-ci-osgi Activator doesn't register the ClassLoaderResolver on the ServiceRegistry LONG DESCRIPTION: The issue is that when the kjar is first loaded or reloaded from a scan, it does not get correctly built because the compiler has no viability to the model objects which reside in a different bundle. This is true even though the correct OSGI level imports and exports are defined. INSTALL REQUIREMENT: Red Hat JBoss BRMS 6.1 Update 4 or Red Hat JBoss BPM Suite 6.1 Update 4 is required INSTALL INSTRUCTIONS: Unzip jboss-brms-6.1.4-BZ-1293965.zip and merge the content from BZ-1293965/maven-repo/ in your own maven repository. Optionally the commands below can be used: cd BZ-1293965/ mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=drools-karaf-features-6.2.0.Final-redhat-13-BZ1293965-features.xml -DgroupId=org.drools -DartifactId=drools-karaf-features -Dversion=6.2.0.Final-redhat-13-BZ1293965 -Dpackaging=xml -DpomFile=drools-karaf-features-6.2.0.Final-redhat-13-BZ1293965.pom -Dclassifier=features mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=drools-compiler-6.2.0.Final-redhat-13-BZ1293965.jar -Dsources=drools-compiler-6.2.0.Final-redhat-13-BZ1293965-sources.jar -DpomFile=drools-compiler-6.2.0.Final-redhat-13-BZ1293965.pom -DgroupId=org.drools -DartifactId=drools-compiler -Dversion=6.2.0.Final-redhat-13-BZ1293965 -Dpackaging=jar mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=kie-ci-osgi-6.2.0.Final-redhat-13-BZ1293965.jar -Dsources=kie-ci-osgi-6.2.0.Final-redhat-13-BZ1293965-sources.jar -DpomFile=kie-ci-osgi-6.2.0.Final-redhat-13-BZ1293965.pom -DgroupId=org.kie -DartifactId=kie-ci-osgi -Dversion=6.2.0.Final-redhat-13-BZ1293965 -Dpackaging=jar ----------------- After installed the maven artefacts: 1) Open Fuse console 2) Unistall old features/apps that used the previous features file. E.g.: features:uninstall fuse-bxms-switchyard-quickstart-rules-interview features:uninstall fuse-bxms-switchyard-rules features:uninstall fuse-bxms-switchyard-common-knowledge 2) Search for references of bundles using drools/kie/jbpm and remove them: list -t 0 -s | grep drools list -t 0 -s | grep kie list -t 0 -s | grep jbpm For all the Bundles: osgi:uninstall <BUNDLE_ID> 3) Remove the any old drools-karaf-features url, e.g.: features:removeurl mvn:org.drools/drools-karaf-features/6.2.0.Final-<version>/xml/features 4) Restart Fuse 5) Add the new features file: features:addurl mvn:org.drools/drools-karaf-features/6.2.0.Final-redhat-13-BZ1293965/xml/features 6) Install the features: features:install ... ----------------- CREATOR: Alessandro Lazarotti DATE: 15-Jan-2016
Story Points: ---
Clone Of: 1293455
Last Closed: 2016-02-22 17:06:02 EST
Type: Support Patch
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch (19.05 MB, application/zip)
2016-01-07 14:55 EST, Alessandro Lazarotti
no flags Details
patch (19.05 MB, application/zip)
2016-01-15 07:36 EST, Alessandro Lazarotti
no flags Details
patch (19.05 MB, application/zip)
2016-01-15 08:01 EST, Alessandro Lazarotti
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-1012 Major Closed kie-ci-osgi Activator doesn't register the ClassLoaderResolver on the ServiceRegistry 2016-07-21 09:57 EDT

  None (edit)
Comment 3 Mario Fusco 2015-12-23 14:16:09 EST
It's useless to backport this fix to branch 6.2.x (BRMS 6.1.x) because maven integration provided by kie-ci doesn't work under OSGi anyway.
Comment 9 Mario Fusco 2016-01-04 13:02:27 EST
Cherry-picked to 6.2.x branch with https://github.com/droolsjbpm/drools/commit/2d58dff9c
Comment 11 Alessandro Lazarotti 2016-01-07 14:55 EST
Created attachment 1112607 [details]

md5sum jboss-brms-6.1.4-BZ-1293965.zip 
4748f979b895a9bb53b6c856b7c00496  jboss-brms-6.1.4-BZ-1293965.zip
Comment 12 Jiri Petrlik 2016-01-15 05:42:23 EST
1. The name of drools-karaf-features file is wrong. There should be dash ("-featurese.xml") instead of dot (".featurese.xml"):
- file drools-karaf-features-6.2.0.Final-redhat-13-BZ1293965.features.xml should be drools-karaf-features-6.2.0.Final-redhat-13-BZ1293965-features.xml
- this problem appears in directory "BZ-1293965" and in "BZ-1293965/maven-repo/org/drools/drools-karaf-features/6.2.0.Final-redhat-13-BZ1293965" directory.
- If the user will merge patch Maven repository to his Maven repo, then Fuse will not be able to find "drools-karaf-features" file. It will be impossible to install BxMS features.

2. pom.xml is missing in "BZ-1293965/maven-repo/org/drools/drools-karaf-features/6.2.0.Final-redhat-13-BZ1293965". This pom.xml was available for all previous builds of this artifact.

3. Line 23 in "README.txt": File "drools-karaf-features-6.2.0.Final-redhat-6-BZ1293965.jar" is not present in the patch and can not be installed. This line should be removed from readme.

4. Line 25 in "README.txt": The parameter "-Dfile" is correct. However, the command will fail. The reason is described in point 1.

5. Line 50 in "README.txt": The command should be written more generally - for example: features:removeurl mvn:org.drools/drools-karaf-features/6.2.0.Final-<version>/xml/features
Comment 13 Alessandro Lazarotti 2016-01-15 07:36 EST
Created attachment 1115134 [details]

md5sum jboss-brms-6.1.4-BZ-1293965.zip 
e74cb44a14b1826448acf00b9de17beb  jboss-brms-6.1.4-BZ-1293965.zip

The patch above contain the README fixes and add the pom for the features.xml.
Comment 14 Alessandro Lazarotti 2016-01-15 08:01 EST
Created attachment 1115136 [details]

the correct MD5 is the:

md5sum jboss-brms-6.1.4-BZ-1293965.zip 
40aab240ed19efaf8ce6f390622966d6  jboss-brms-6.1.4-BZ-1293965.zip
Comment 15 Jiri Petrlik 2016-01-18 03:53:07 EST
Verified using reproducer attached to BZ#1293455 [1].

It was necessary to change KieSessionService.java in reproducer to achieve the correct behaviour.
- line 20 of "KieSessionService.java" should be: kieContainer = kieServices.newKieContainer( kieServices.newReleaseId( groupId, artifactId, version ), this.getClass().getClassLoader() );

Regression tests passed successfully.

[1] https://bugzilla.redhat.com/attachment.cgi?id=1108448

patch md5sum - 40aab240ed19efaf8ce6f390622966d6

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