Red Hat Bugzilla – Bug 1310981
LinkageError in org.mvel2.ParserConfiguration
Last modified: 2016-04-06 06:49:01 EDT
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":
Version-Release number of selected component (if applicable):
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.
NoClassDefFoundError is wrapped in java.lang.LinkageError which is not captured, hence rule compilation fails.
no exception :)
This code change captures "Throwable" instead which fixes MVEL-43:
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.
Fixed on mvel by https://github.com/mvel/mvel/commit/d3aeaf17aa978d8c3e14d38c3afc821045d92f75
Cannot reproduce this issue. However verifying this. The new mvel with Mario's fix is part of the build.