Geoffrey De Smet created DROOLS-20:
--------------------------------------
Summary: Compilation exception gets eaten by MVEL
Key: DROOLS-20
URL:
https://issues.jboss.org/browse/DROOLS-20
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Geoffrey De Smet
Assignee: Mario Fusco
Priority: Critical
To reproduce:
- open planner, run the CloudBalancingApp, load a dataset and click button solve. This
will work.
- Now open
drools-planner-examples/src/main/resources/org/drools/planner/examples/cloudbalancing/solver/cloudBalancingScoreRules.drl
- At line 114, change
{code}
IntConstraintOccurrence(constraintType = ...
{code}
into
{code}
IntConstraintOccurrence(ConstraintType = ...
{code}
(so change only the case of the first letter of constraintType
- Run the CloudBalancingApp, load a dataset and click button solve. It will fail with this
exception (which is not the real exception):
{code}
org.kie.runtime.rule.ConsequenceException: Exception executing consequence for rule
"computerCost" in org.drools.planner.examples.cloudbalancing.solver:
java.lang.NullPointerException
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
...
Caused by: java.lang.NullPointerException: null
at java.lang.String.<init>(String.java:168) ~[na:1.7.0_09]
at org.mvel2.util.ErrorUtil.rewriteIfNeeded(ErrorUtil.java:12)
~[mvel2-2.1.3.Final.jar:na]
at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:302)
~[mvel2-2.1.3.Final.jar:na]
at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62)
~[mvel2-2.1.3.Final.jar:na]
at org.mvel2.MVEL.compileExpression(MVEL.java:810) ~[mvel2-2.1.3.Final.jar:na]
at org.drools.base.mvel.MVELCompilationUnit.compile(MVELCompilationUnit.java:435)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:238)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.rule.constraint.MvelConstraint.createMvelConditionEvaluator(MvelConstraint.java:205)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:189)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:156)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:143)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:498)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:383)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:232)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:352)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.beliefsystem.simple.SimpleBeliefSystem.insert(SimpleBeliefSystem.java:49)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:150)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:121)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:227)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:255)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:220)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:215)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at
org.drools.planner.examples.cloudbalancing.solver.Rule_computerCost_eb2dbb0704b64ca3a554fbda80ff54ab.defaultConsequence(Rule_computerCost_eb2dbb0704b64ca3a554fbda80ff54ab.java:7)
~[na:na]
at
org.drools.planner.examples.cloudbalancing.solver.Rule_computerCost_eb2dbb0704b64ca3a554fbda80ff54abDefaultConsequenceInvokerGenerated.evaluate(Unknown
Source) ~[na:na]
at
org.drools.planner.examples.cloudbalancing.solver.Rule_computerCost_eb2dbb0704b64ca3a554fbda80ff54abDefaultConsequenceInvoker.evaluate(Unknown
Source) ~[na:na]
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1421)
~[drools-core-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
... 21 common frames omitted
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira