]
Mario Fusco reassigned JBRULES-3523:
------------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
java.lang.ClassCastException:
org.drools.facttemplates.FactTemplateObjectType cannot be cast to
org.drools.base.ClassObjectType
-------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3523
URL:
https://issues.jboss.org/browse/JBRULES-3523
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Viswa Repalle
Assignee: Mario Fusco
Fix For: 5.4.1.Final, 5.5.0.Beta1
I have analyzed the issue and found that the issue is happening at the initDeclaredMask
method of BetaNode.java of drools-core-5.4.0.final.jar at the following lines of code:
ObjectType objectType = pattern.getObjectType();
if ( !(objectType instanceof ClassObjectType) ) {
// InitialFact has no type declaration and cannot be property specific
// Only ClassObjectType can use property specific
rightDeclaredMask = Long.MAX_VALUE;
}
Class objectClass = ((ClassObjectType) objectType).getClassType();
The above code will throw ClassCastException as irrespective of the objectType is
instance of ClassObjectType or not, trying to type cast to ClassObjectType.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: