[jboss-jira] [JBoss JIRA] (DROOLS-1395) ClassCastException when adding a type declaration with incremental upgrade

Mario Fusco (JIRA) issues at jboss.org
Tue Jan 3 13:04:00 EST 2017


Mario Fusco created DROOLS-1395:
-----------------------------------

             Summary: ClassCastException when adding a type declaration with incremental upgrade
                 Key: DROOLS-1395
                 URL: https://issues.jboss.org/browse/DROOLS-1395
             Project: Drools
          Issue Type: Bug
          Components: core engine
            Reporter: Mario Fusco
            Assignee: Mario Fusco


The addition of a type declaration during an incremental compilation like the following:

{code}
declare OtherDummyEvent
    @role( event )
    @timestamp( timestamp )
end
{code}

is not reflected in the existing knowledge base. For this reason also adding a new rule like this

{code}
rule "RG_TEST_2"
    when
       $event: DummyEvent ()
       $other : OtherDummyEvent(id == $event.id, this after $event)
    then
        System.out.println("RG_TEST_2 fired");
        retract($other);
end
{code}

and inserting an OtherDummyEvent causes the following ClassCastException :

{code}
ClassCastException: org.drools.core.common.DefaultFactHandle cannot be cast to org.drools.core.common.EventFactHandle
{code}

because the instance of OtherDummyEvent is considered a fact instead of an event.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list