Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1751

NullPointerException on org.mvel2.MVEL.executeExpression()

    Details

      Description

      Under the conditions:

      • 2 KiePackages with the same package name but different rules
      • Those packages are used by a kbase so "inUse = true"
      • Create another kbase and call kbase.addPackages() for those packages

      MVELDialectRuntimeData has a problem in merging mvelReaders so later rule execution fails with NullPointerException.

      java.lang.NullPointerException: null
      	at org.mvel2.MVEL.executeExpression(MVEL.java:953)
      	at org.drools.core.util.MVELSafeHelper$RawMVELEvaluator.executeExpression(MVELSafeHelper.java:506)
      	at org.drools.core.base.extractors.MVELObjectClassFieldReader.getValue(MVELObjectClassFieldReader.java:140)
      	at org.drools.core.rule.Declaration.getValue(Declaration.java:222)
      	at org.drools.core.base.mvel.MVELCompilationUnit.updateFactory(MVELCompilationUnit.java:386)
      	at org.drools.core.base.mvel.MVELCompilationUnit.getFactory(MVELCompilationUnit.java:320)
      	at org.drools.core.base.dataproviders.MVELDataProvider.evaluate(MVELDataProvider.java:137)
      	at org.drools.core.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:133)
      	at org.drools.core.phreak.PhreakFromNode.doLeftInserts(PhreakFromNode.java:106)
      	at org.drools.core.phreak.PhreakFromNode.doNode(PhreakFromNode.java:68)
      	at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:387)
      	at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:333)
      	at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:169)
      	at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:127)
      	at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:212)
      	at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:87)
      	at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
      	at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
      	at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1067)
      	at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1014)
      	at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1006)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1320)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1311)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1295)
      	at org.drools.compiler.integrationtests.Misc2Test.testMergeMVELDialect(Misc2Test.java:9109)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mfusco Mario Fusco
                  Reporter:
                  tkobayashi Toshiya Kobayashi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: