Bug 996018

Summary: Updating event through an EntryPoint causes ClassCastException
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: mfusco, rzhang
Target Milestone: ER2Keywords: Regression
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:20:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer test case - DRL
none
Reproducer test case - java
none
Exception stacktrace none

Description Marek Winkler 2013-08-12 08:46:18 UTC
Description of problem:

Having a DRL defining a time window, when updating an event using 

        FactHandle handle = entryPoint.insert(event);

        TestEvent event2 = new TestEvent("testEvent2");
        entryPoint.update(handle, event2);

a CCE is thrown:

java.lang.ClassCastException: org.drools.core.reteoo.WindowNode cannot be cast to org.drools.core.reteoo.BetaNode
	at org.drools.core.reteoo.WindowNode.modifyObject(WindowNode.java:262)

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT
Drools 6.0.0.CR1

This worked in 6.0.0.Beta3.

How reproducible:

Please run the attached reproducer test.

Actual results:

CCE is thrown.

Expected results:

The test passes.

Comment 1 Marek Winkler 2013-08-12 08:48:17 UTC
Created attachment 785610 [details]
Reproducer test case - DRL

Comment 2 Marek Winkler 2013-08-12 08:49:00 UTC
Created attachment 785611 [details]
Reproducer test case - java

Comment 3 Marek Winkler 2013-08-12 10:53:41 UTC
Created attachment 785643 [details]
Exception stacktrace

Comment 4 Mario Fusco 2013-08-19 15:39:29 UTC
Fixed by removing the unnecessary (and wrong) cast.

Comment 6 Marek Winkler 2013-09-02 13:22:21 UTC
Verified on BRMS 6.0.0 ER2.