Bug 996018 - Updating event through an EntryPoint causes ClassCastException
Summary: Updating event through an EntryPoint causes ClassCastException
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER2
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-12 08:46 UTC by Marek Winkler
Modified: 2014-08-06 20:20 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:20:49 UTC
Type: Bug
Embargoed:


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

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.


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