Line 3 of the error message suggests that the parser isn't able to
determine the type of $existingValue as java.lang.String. So, strict
or no strict, the problem might be in the rule. Show?
-W
On 25/05/2012, Joe White <Joe.White(a)recondotech.com> wrote:
How do you disable strict mode in 5.4? We are using the code below
and
getting strict mode exceptions. It worked in prior versions. Do you have
to use the new APIs to disable strict mode?
PackageBuilderConfiguration pkgBuilderCfg = new
PackageBuilderConfiguration();
MVELDialectConfiguration mvelConf = (MVELDialectConfiguration)
pkgBuilderCfg.getDialectConfiguration( "mvel" );
mvelConf.setStrict(false);
mvelConf.setLangLevel(5);
PackageBuilder builder = new PackageBuilder(pkgBuilderCfg);
builder.addPackageFromDrl(new StringReader(drlString));
An example exception:
1.
19:17:51,137|ERROR|drools.DroolsMgr|DroolsMgr.java|159|deployRulesFromMo
delForScope|org.apache.camel.spring.Main.main()|smf-rcp-SNAPSHOT|Failed
to deploy rules from model
2. com.recondotech.hre.rules.management.HRERulesManagmentException:
org.drools.rule.InvalidRulePackage: Unable to Analyse Expression
$existingValue.toLowerCase():
3. [Error: unable to resolve method using strict-mode:
java.lang.Object.toLowerCase()]
4. [Near : {... $existingValue.toLowerCase() ....}]
5. ^ : [Rule
name='PEL_CHANGELIST_RES.AUTH.Actual First Name']
Thanks
Joe