Bug 814409 - NPE when used Event types + rules with sliding window + package compiled by BRM (Guvnor)
Summary: NPE when used Event types + rules with sliding window + package compiled by B...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER7
: BRMS 5.3.0.GA
Assignee: manstis
QA Contact:
URL:
Whiteboard:
Depends On: 811745
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-19 19:49 UTC by Alessandro Lazarotti
Modified: 2025-02-10 03:19 UTC (History)
1 user (show)

Fixed In Version:
Clone Of: 811745
Environment:
Last Closed: 2025-02-10 03:19:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alessandro Lazarotti 2012-04-19 19:49:57 UTC
+++ This bug was initially created as a clone of Bug #811745 +++

Packages compiled by BRM (Guvnor) ignore Event types, so if a rule uses sliding window a NPE is throwed:
h
java.lang.NullPointerException
at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:80)
at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:65)
at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:705)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:282)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at john.DroolsError.runRules(DroolsError.java:48)
at john.DroolsError.main(DroolsError.java:40) 

Packages compiled by BRM (Guvnor) ignore Event types, so if a rule uses sliding window a NPE is throwed:

java.lang.NullPointerException
at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:80)
at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:65)
at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:705)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:282)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at john.DroolsError.runRules(DroolsError.java:48)
at john.DroolsError.main(DroolsError.java:40) 

That does not happen if used KnowledgeBuilder and a regular drl file instead of KnowledgeAgent + package binaries from Guvnor.
It can be checked by test scenarios as well. Attached here a repository that reproduces this issue, there is a test scenario in the package "cep" which simulate this situation.

--- Additional comment from alazarot on 2012-04-11 16:53:13 EDT ---

Created attachment 576889 [details]
repository export containing a test scenario reproducing the issue

Comment 1 Alessandro Lazarotti 2012-04-19 19:53:53 UTC
This is a clone from Bug #811745 to cherry pick the fix to BRMS 5.3 as well,  since it is a block to put BRM(Guvnor)and CEP rules to work together.

Comment 2 Rick Wagner 2012-04-19 20:19:49 UTC
GSS considers this an important addition to BRMS 5.3, as it is being fixed in 5.2 and we don't want a regression.

Thanks,

Rick

Comment 3 manstis 2012-04-25 09:50:08 UTC
Assigned to etirelli who is working on the referenced https://bugzilla.redhat.com/show_bug.cgi?id=811745

Comment 4 Edson Tirelli 2012-04-25 14:12:30 UTC
Fixed the core engine part. Michael is now making sure the guvnor part is ok. Please read comments on the related ticket for details.

Comment 5 manstis 2012-04-26 13:52:36 UTC
Guvnor fixes made to branches 5.2.x, 5.3.x, 5.4.x and master.

Comment 6 Ryan Zhang 2012-05-14 08:16:33 UTC
The fixed for this issue should be included in ER7. Please do verification on it.

Comment 8 Lukáš Petrovický 2012-05-22 08:43:23 UTC
The fix is in and the test doesn't fail. VERIFIED.

Comment 12 Red Hat Bugzilla 2025-02-10 03:19:39 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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