Bug 1321281

Summary: [GSS] (6.2.z) LinkageError in org.mvel2.ParserConfiguration
Product: [Retired] JBoss BRMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: BREAssignee: Ryan Zhang <rzhang>
Status: CLOSED NOTABUG QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: astephen, cparham, enagai, kverlaen, lpetrovi, lywang, mbiarnes, mfusco, mwinkler, rrajasek, rzhang
Target Milestone: CR1   
Target Release: 6.2.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1310981 Environment:
Last Closed: 2016-11-22 09:13:33 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: 1310981    
Bug Blocks: 1327763, 1327765    

Description Toshiya Kobayashi 2016-03-25 07:36:58 UTC
+++ This bug was initially created as a clone of Bug #1310981 +++

Description of problem:

The "java.lang.LinkageError" is not captured and rule compilation fails when "Bar.class" exists in classpath and an identifier "bar" is used in the rule. This only happens on case-preserving but case-insensitive systems (Mac or Windows.)

Very similar to "MVEL-43":
http://web.archive.org/web/20150516202621/http://jira.codehaus.org/browse/MVEL-43


Version-Release number of selected component (if applicable):
mvel2-2.2.7.Final-redhat-1


How reproducible:
Always


Steps to Reproduce:
1. have a rule using an identifier "bar" in any expression , for example, "abc.bar=Bar.XYZ"
2. package this rule in a war, and dependency Bar.class is packaged in an exploded folder under "WEB-INF/lib/" (Bar.class is not packaged in a jar archive)
3. deploy this war in EAP 6 on Mac machine.


Actual results:
NoClassDefFoundError is wrapped in  java.lang.LinkageError which is not captured, hence rule compilation fails.

Expected results:
no exception :)


Additional info:

This code change captures "Throwable" instead which fixes MVEL-43:
https://github.com/codehaus/mvel/commit/90dc86c2aa528d06f7fc2670346fde2f7689b787

However that's for "org/mvel/ParserContext.java"


For BRMS 6.2 which uses "mvel2-2.2.7.Final-redhat-1", the "LinkageError" still got thrown / un-handled.
http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.mvel/mvel2/2.2.6.Final/org/mvel2/ParserConfiguration.java#172

--- Additional comment from Mario Fusco on 2016-03-18 11:14:27 EDT ---

Fixed on mvel by https://github.com/mvel/mvel/commit/d3aeaf17aa978d8c3e14d38c3afc821045d92f75

Comment 3 Mario Fusco 2016-04-18 16:26:00 UTC
Fixed by upgrading mvel version on 6.3.x branch with https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/9f979af74

Comment 4 Marek Winkler 2016-05-09 13:20:03 UTC
The MVEL version in 6.2.3.CR1 is still 2.2.7.Final-redhat-1.

Comment 8 Ryan Zhang 2016-05-12 12:37:43 UTC
Updated the mvel version to 2.2.8.Final-redhat-1 in brms.cfg