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

Events deserialization is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.3.0.Beta1
    • Component/s: None
    • Labels:
      None

      Description

      When a KieSession is deserialized the events present in the old serialized session are reasserted into the new session. Then if one of this event causes a scheduler to be immediately triggered this is done in a callback out of the main evaluation loop. This implies that the left tuples resulting from the triggering of the scheduler aren't propagated to the sink of the TimerNode which created the scheduler itself. This missing propagation can, in some circumstances, cause a NullPointerException like the following:

      java.lang.NullPointerException
      	at org.drools.core.phreak.PhreakTimerNode.doLeftDeletes(PhreakTimerNode.java:197)
      	at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:63)
      	at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:364)
      	at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:163)
      	at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:118)
      	at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:254)
      	at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:108)
      	at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1022)
      	at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1352)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1318)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1301)
      	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1280)
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: