Bug 1310981

Summary: LinkageError in org.mvel2.ParserConfiguration
Product: [Retired] JBoss BPMS Platform 6 Reporter: Lyle Wang <lywang>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Tibor Zimanyi <tzimanyi>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.2.0CC: cparham, kverlaen, lpetrovi
Target Milestone: ER2   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1321281 (view as bug list) Environment:
Last Closed: 2020-03-27 19:06:42 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:
Bug Depends On:    
Bug Blocks: 1321281    

Description Lyle Wang 2016-02-23 06:19:35 UTC
Created attachment 1129610 [details]
Example log showing the error on drools 6.0.3

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

Comment 3 Tibor Zimanyi 2016-04-06 10:49:01 UTC
Cannot reproduce this issue. However verifying this. The new mvel with Mario's fix is part of the build.