This is a bug for sure. May I ask you please to open a JIRA for it?<br><br> Thank you,<br> Edson<br><br><br><div><span class="gmail_quote">2007/6/14, BrianKE <<a href="mailto:brianke@gmail.com">brianke@gmail.com
</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">After asserrting the following objects and performing the rule I get the error
<br>shown<br><br> PersonSummary personSummary = new PersonSummary();<br> personSummary.setPrId(new Long(217));<br> personSummary.setCmpntCd(new Character('R'));<br><br> PersonSummary personSummary2 = new PersonSummary();
<br> personSummary2.setPrId(new Long(217));<br> personSummary2.setCmpntCd(new Character('G'));<br><br>##################################<br><br>rule "Duplicate Projection for same processing date by another component"
<br> when<br> $j : PersonSummary($prId : prId, $cmpntCd : cmpntCd)<br> exists PersonSummary(this != $j, cmpntCd == $cmpntCd)<br> then<br> System.out.println("Error Found in rule Duplicate Component
<br>Code");<br>end<br><br>##################################<br><br>java.lang.ClassCastException:<br>org.drools.rule.VariableRestriction$ObjectVariableContextEntry<br> at<br>org.drools.base.evaluators.CharacterFactory$CharacterEqualEvaluator.evaluateCac
<br>hedRight(CharacterFactory.java:99)<br> at org.drools.rule.VariableRestriction.isAllowedCachedRight<br>(VariableRestriction.java:78)<br> at org.drools.rule.VariableConstraint.isAllowedCachedRight<br>(VariableConstraint.java
:78)<br> at org.drools.common.DoubleBetaConstraints.isAllowedCachedRight<br>(DoubleBetaConstraints.java:149)<br><br><br><br>If I change the exists rule to:<br><br> exists PersonSummary(this != $j, cmpntCd == 'A')
<br><br>it works fine.<br><br>Is there something I have to do to compare two char objects.<br><br>Thanks<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli
<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>