[jboss-jira] [JBoss JIRA] Created: (JBRULES-1389) using eval after using or causes ClassCastException

Jan Boboli (JIRA) jira-events at lists.jboss.org
Fri Dec 14 06:09:44 EST 2007


using eval after using or causes ClassCastException
---------------------------------------------------

                 Key: JBRULES-1389
                 URL: http://jira.jboss.com/jira/browse/JBRULES-1389
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 4.0.3
         Environment: Windows XP, Linux, 
            Reporter: Jan Boboli
            Priority: Blocker


when using eval after using or the ClassCastException occurs.
Here is a code of the rule causing classcast :


	when
		CccObject()
		BbbObject($bbb:bbb)
		$aaa:AaaObject(aaa==$bbb)
				or
			AaaObject(aaa=="ccc")
		
		eval($aaa.getAaa().equals($bbb))
	then
		System.out.println( "Success!!" ); 
		
end


here is the stacktrace:

org.drools.RuntimeDroolsException: java.lang.ClassCastException: com.sample.CccObjectShadowProxy cannot be cast to com.sample.BbbObject
	at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)
...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list