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

StatefulKnowledgeSession unmarshal fails with NPE

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.1.0.FINAL
    • 5.0.1.FINAL, 5.1.0.M1
    • drools-core (expert)
    • None

      The following rule being present in the knowledge base causes the StatefulKnowledgeSession to fail to unmarshall with an NPE:

      package test.drl
      rule "dummy_rule"
      when
      eval( false )
      then
      end

      Here is the stack trace:
      java.lang.NullPointerException
      at org.drools.marshalling.impl.InputMarshaller.readLeftTuple(InputMarshaller.java:440)
      at org.drools.marshalling.impl.InputMarshaller.readFactHandles(InputMarshaller.java:345)
      at org.drools.marshalling.impl.InputMarshaller.readSession(InputMarshaller.java:207)
      at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarshaller.java:75)
      at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarshaller.java:47)
      at test.DroolsSerializationBugTest.testDroolsSerializationBug(DroolsSerializationBugTest.java:87)
      at test.DroolsSerializationBugTest.main(DroolsSerializationBugTest.java:28)

      Test case attached.
      Fails against 5.0.1 and 5.1.0M1

            etirelli@redhat.com Edson Tirelli
            justinkwaugh_jira Justin Waugh (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived: