Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3222

Error unmarshalling knowledgeSession with Facts inserted in entry-points

    XMLWordPrintable

Details

    Description

      When trying to marshall and then unmarshall a StatefulKnowledgeSession where a Fact has been inserted into an entry-point a NullPointerException is thrown:

      java.lang.NullPointerException
      at org.drools.reteoo.RuleTerminalNodeLeftTuple.<init>(RuleTerminalNodeLeftTuple.java:151)
      at org.drools.reteoo.RuleTerminalNode.createLeftTuple(RuleTerminalNode.java:608)
      at org.drools.marshalling.impl.InputMarshaller.readLeftTuple(InputMarshaller.java:523)
      at org.drools.marshalling.impl.InputMarshaller.readFactHandles(InputMarshaller.java:373)
      at org.drools.marshalling.impl.InputMarshaller.readSession(InputMarshaller.java:230)
      at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarshaller.java:92)
      at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarshaller.java:63)
      at com.sample.DroolsTest.main(DroolsTest.java:50)

      Provided is a testcase with two simple rules matching Fact objects directly and from the entry-point "facts".
      A fact is inserted directly into the knowledgeSession and then it is marshalled and unmarshalled - which works fine.
      Then a fact is inserted into a entry-point "facts" and the session is marshalled and unmarshalled - which throws the NPE.

      Attachments

        Issue Links

          Activity

            People

              mproctor@redhat.com Mark Proctor
              stefanwehner Stefan Wehner (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: