Bug 1319777 - NPE when marshalling persistent KieSession with partially matched forall
Summary: NPE when marshalling persistent KieSession with partially matched forall
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER2
: 6.3.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-21 13:59 UTC by Marek Winkler
Modified: 2020-03-27 19:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:04:15 UTC
Type: Bug


Attachments (Terms of Use)
Exception stacktrace (9.51 KB, text/plain)
2016-03-21 13:59 UTC, Marek Winkler
no flags Details

Description Marek Winkler 2016-03-21 13:59:19 UTC
Created attachment 1138610 [details]
Exception stacktrace

Description of problem:

When serializing a persistent KieSession containing rule such as:

rule "Forall2"
when
  forall ( $pet : Pet ( owner.name == 'dog lady')
	  	  Pet ( this == $pet, type == Pet.PetType.dog )
	 )
then
end

with the fact:

  new Pet(Pet.PetType.dog, new Person("cat lady")) // the person name does not match the rule

then the following NPE is thrown during transaction commit (see the attachment for full stacktrace):

java.lang.NullPointerException: null
	at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeRIANodeMemory(ProtobufOutputMarshaller.java:462) ~[drools-core-6.4.0.Beta2-redhat-1.jar:6.4.0.Beta2-redhat-1]
	at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeNodeMemories(ProtobufOutputMarshaller.java:378) ~[drools-core-6.4.0.Beta2-redhat-1.jar:6.4.0.Beta2-redhat-1]
	at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.serializeSession(ProtobufOutputMarshaller.java:166) ~[drools-core-6.4.0.Beta2-redhat-1.jar:6.4.0.Beta2-redhat-1]
...

This is a regression from 6.2.x, proposing as a blocker.

Version-Release number of selected component (if applicable):
BRMS 6.3.0.ER1

How reproducible:
always

Steps to Reproduce:
1. run unit test PersistentSessionForallTest from the PR (to be submitted)

Actual results:
NPE is thrown.

Expected results:
Test passes.

Comment 1 Marek Winkler 2016-03-21 14:03:16 UTC
PR with reproducer: https://github.com/droolsjbpm/drools/pull/698

Comment 3 Marek Winkler 2016-04-01 08:52:15 UTC
Verified in BRMS 6.3.0 ER2.


Note You need to log in before you can comment on or make changes to this bug.