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

Equals behaviour faulty when loading sessions after exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 6.3.0.Final
    • core engine
    • None
    • NEW
    • NEW

      This is in a series of debugging and I think a few issues boil down to this:

      https://issues.jboss.org/browse/DROOLS-1093
      https://issues.jboss.org/browse/DROOLS-1097

      This bug demonstrates how two identical sessions with identical input and rules produce a NPE when loading with equals behaviour vs identity behaviour. I am currently battling that issue and looking for a workaround.

      Essentially, you can run the unit tests I attached in the test project: (ExceptionTest)

      testIdentity - passes
      testIdentityWithReload - passes
      testEquals - NPE
      testEqualsWithReload- NPE

      The tests do the same thing:

      • Create new persistent session
      • Load facts into it
      • Run 20 times either reloading the session (depending on the test cases) or using the old session. Each run, insert one fact and run all the rules. Eventually the equals tests (I believe after iteration 2) NPE when trying to deserialise the session. Identity has no issues and functions correctly.

      Let me know if you need anything else and please do let me know if there is a workaround. I am currently exploring the workaround avenue myself as well and will come back here with an update should I find one.

            mfusco@redhat.com Mario Fusco
            pandaadb Artur Kronenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: