Bug 996018 - Updating event through an EntryPoint causes ClassCastException
Updating event through an EntryPoint causes ClassCastException
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ER2
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
: Regression
Depends On:
  Show dependency treegraph
Reported: 2013-08-12 04:46 EDT by Marek Winkler
Modified: 2014-08-06 16:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:20:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Reproducer test case - DRL (326 bytes, text/plain)
2013-08-12 04:48 EDT, Marek Winkler
no flags Details
Reproducer test case - java (2.33 KB, text/x-java)
2013-08-12 04:49 EDT, Marek Winkler
no flags Details
Exception stacktrace (732 bytes, text/plain)
2013-08-12 06:53 EDT, Marek Winkler
no flags Details

  None (edit)
Description Marek Winkler 2013-08-12 04:46:18 EDT
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 04:48:17 EDT
Created attachment 785610 [details]
Reproducer test case - DRL
Comment 2 Marek Winkler 2013-08-12 04:49:00 EDT
Created attachment 785611 [details]
Reproducer test case - java
Comment 3 Marek Winkler 2013-08-12 06:53:41 EDT
Created attachment 785643 [details]
Exception stacktrace
Comment 4 Mario Fusco 2013-08-19 11:39:29 EDT
Fixed by removing the unnecessary (and wrong) cast.
Comment 6 Marek Winkler 2013-09-02 09:22:21 EDT
Verified on BRMS 6.0.0 ER2.

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