Re: [rules-users] Regression with Drools 5.3.0-CR1
JBRULES-2995 is fixed now, except for a corner case when using .class literals with fully qualified class names. This will be fixed in MVEL for 5.3 final release. This works fine now: Primitives( classAttr == (java.lang.String.class), eval(classAttr.equals( java.lang.String.class ) ), classAttr == String.class ) Also, some improvements on the free form expression support: $p1 : Person( age 2*10, 10 age ) $p2 : Person( age 2*$p1.age ) Please let me know if you find any other cases where free form expressions are raising errors. Thank you, Edson 2011/9/26 Edson Tirelli ed.tire...@gmail.com Ok, this is fixed: https://issues.jboss.org/browse/JBRULES-3224 I will check JBRULES-2995 now. Edson 2011/9/26 Edson Tirelli ed.tire...@gmail.com Thanks Wolfgang. That is a different issue related to how MVEL deals with class literals. I will check what's the status on it anyway. Edson 2011/9/26 Wolfgang Laun wolfgang.l...@gmail.com Note that https://issues.jboss.org/browse/JBRULES-2995 reported against 5.2.0.CR1 and still open might be related. -W 2011/9/26 Edson Tirelli ed.tire...@gmail.com Thomas, Thanks for reporting. I will look into it. Did you open a JIRA yet? Let me know or I will do it otherwise. Edson 2011/9/26 Swindells, Thomas tswinde...@nds.com I’ve just tried upgrading from Drools 5.3.0-CR1 from the beta and I’ve hit a regression. ** ** JBoss seems to have been down for most of today so I haven’t been able to raise a Jira for it. ** ** In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren’t null. Eg Fact { ClassObject classField} ** ** Rule “xyz” When Fact(classField != null) Then … End ** ** This is giving the following exception ** ** Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87) at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more ** ** Wrapping the classField != null within an eval appears to be a work around. ** ** This is in the suspect method: *public* *boolean* evaluate(InternalWorkingMemory workingMemory, *final* InternalReadAccessor extractor, *final* Object object1, *final*FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 ); Object value2 = object2.getValue(); *if* ( value2 == *null* ) { ClassFieldImpl classField = (ClassFieldImpl) object2;* *** value2 = classField.resolve( workingMemory ); } *return* *comparator*.equals( value1, value2 ); } ** ** I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! ** ** ** ** Thomas -- ** This message is confidential and intended only for the
[rules-users] Regression with Drools 5.3.0-CR1
I've just tried upgrading from Drools 5.3.0-CR1 from the beta and I've hit a regression. JBoss seems to have been down for most of today so I haven't been able to raise a Jira for it. In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren't null. Eg Fact { ClassObject classField} Rule xyz When Fact(classField != null) Then ... End This is giving the following exception Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87) at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more Wrapping the classField != null within an eval appears to be a work around. This is in the suspect method: public boolean evaluate(InternalWorkingMemory workingMemory, final InternalReadAccessor extractor, final Object object1, final FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 ); Object value2 = object2.getValue(); if ( value2 == null ) { ClassFieldImpl classField = (ClassFieldImpl) object2; value2 = classField.resolve( workingMemory ); } return comparator.equals( value1, value2 ); } I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! Thomas ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Regression with Drools 5.3.0-CR1
That's a nice one.. We will definitely create a test for that.. if it's not there.. 2011/9/26 Swindells, Thomas tswinde...@nds.com I’ve just tried upgrading from Drools 5.3.0-CR1 from the beta and I’ve hit a regression. ** ** JBoss seems to have been down for most of today so I haven’t been able to raise a Jira for it. ** ** In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren’t null. Eg Fact { ClassObject classField} ** ** Rule “xyz” When Fact(classField != null) Then … End ** ** This is giving the following exception ** ** Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87)** ** at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109)*** * at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more ** ** Wrapping the classField != null within an eval appears to be a work around. ** ** This is in the suspect method: *public* *boolean* evaluate(InternalWorkingMemory workingMemory,** ** *final* InternalReadAccessor extractor,*** * *final* Object object1, *final* FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 );* *** Object value2 = object2.getValue(); *if* ( value2 == *null* ) { ClassFieldImpl classField = (ClassFieldImpl) object2; value2 = classField.resolve( workingMemory ); } *return* *comparator*.equals( value1, value2 ); } ** ** I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! ** ** ** ** Thomas -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Regression with Drools 5.3.0-CR1
Thomas, Thanks for reporting. I will look into it. Did you open a JIRA yet? Let me know or I will do it otherwise. Edson 2011/9/26 Swindells, Thomas tswinde...@nds.com I’ve just tried upgrading from Drools 5.3.0-CR1 from the beta and I’ve hit a regression. ** ** JBoss seems to have been down for most of today so I haven’t been able to raise a Jira for it. ** ** In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren’t null. Eg Fact { ClassObject classField} ** ** Rule “xyz” When Fact(classField != null) Then … End ** ** This is giving the following exception ** ** Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87)** ** at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109)*** * at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more ** ** Wrapping the classField != null within an eval appears to be a work around. ** ** This is in the suspect method: *public* *boolean* evaluate(InternalWorkingMemory workingMemory,** ** *final* InternalReadAccessor extractor,*** * *final* Object object1, *final* FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 );* *** Object value2 = object2.getValue(); *if* ( value2 == *null* ) { ClassFieldImpl classField = (ClassFieldImpl) object2; value2 = classField.resolve( workingMemory ); } *return* *comparator*.equals( value1, value2 ); } ** ** I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! ** ** ** ** Thomas -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Regression with Drools 5.3.0-CR1
Note that https://issues.jboss.org/browse/JBRULES-2995 reported against 5.2.0.CR1 and still open might be related. -W 2011/9/26 Edson Tirelli ed.tire...@gmail.com Thomas, Thanks for reporting. I will look into it. Did you open a JIRA yet? Let me know or I will do it otherwise. Edson 2011/9/26 Swindells, Thomas tswinde...@nds.com I’ve just tried upgrading from Drools 5.3.0-CR1 from the beta and I’ve hit a regression. ** ** JBoss seems to have been down for most of today so I haven’t been able to raise a Jira for it. ** ** In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren’t null. Eg Fact { ClassObject classField} ** ** Rule “xyz” When Fact(classField != null) Then … End ** ** This is giving the following exception ** ** Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87)* *** at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109)** ** at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204)*** * at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)*** * at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more ** ** Wrapping the classField != null within an eval appears to be a work around. ** ** This is in the suspect method: *public* *boolean* evaluate(InternalWorkingMemory workingMemory,* *** *final* InternalReadAccessor extractor,** ** *final* Object object1, *final*FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 ); Object value2 = object2.getValue(); *if* ( value2 == *null* ) { ClassFieldImpl classField = (ClassFieldImpl) object2; value2 = classField.resolve( workingMemory ); } *return* *comparator*.equals( value1, value2 ); } ** ** I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! ** ** ** ** Thomas -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Regression with Drools 5.3.0-CR1
Thanks Wolfgang. That is a different issue related to how MVEL deals with class literals. I will check what's the status on it anyway. Edson 2011/9/26 Wolfgang Laun wolfgang.l...@gmail.com Note that https://issues.jboss.org/browse/JBRULES-2995 reported against 5.2.0.CR1 and still open might be related. -W 2011/9/26 Edson Tirelli ed.tire...@gmail.com Thomas, Thanks for reporting. I will look into it. Did you open a JIRA yet? Let me know or I will do it otherwise. Edson 2011/9/26 Swindells, Thomas tswinde...@nds.com I’ve just tried upgrading from Drools 5.3.0-CR1 from the beta and I’ve hit a regression. ** ** JBoss seems to have been down for most of today so I haven’t been able to raise a Jira for it. ** ** In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren’t null. Eg Fact { ClassObject classField} ** ** Rule “xyz” When Fact(classField != null) Then … End ** ** This is giving the following exception ** ** Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87) at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109)* *** at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204)** ** at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)** ** at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more ** ** Wrapping the classField != null within an eval appears to be a work around. ** ** This is in the suspect method: *public* *boolean* evaluate(InternalWorkingMemory workingMemory, *final* InternalReadAccessor extractor,* *** *final* Object object1, *final*FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 ); Object value2 = object2.getValue(); *if* ( value2 == *null* ) { ClassFieldImpl classField = (ClassFieldImpl) object2;*** * value2 = classField.resolve( workingMemory ); } *return* *comparator*.equals( value1, value2 ); } ** ** I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! ** ** ** ** Thomas -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core
Re: [rules-users] Regression with Drools 5.3.0-CR1
Ok, this is fixed: https://issues.jboss.org/browse/JBRULES-3224 I will check JBRULES-2995 now. Edson 2011/9/26 Edson Tirelli ed.tire...@gmail.com Thanks Wolfgang. That is a different issue related to how MVEL deals with class literals. I will check what's the status on it anyway. Edson 2011/9/26 Wolfgang Laun wolfgang.l...@gmail.com Note that https://issues.jboss.org/browse/JBRULES-2995 reported against 5.2.0.CR1 and still open might be related. -W 2011/9/26 Edson Tirelli ed.tire...@gmail.com Thomas, Thanks for reporting. I will look into it. Did you open a JIRA yet? Let me know or I will do it otherwise. Edson 2011/9/26 Swindells, Thomas tswinde...@nds.com I’ve just tried upgrading from Drools 5.3.0-CR1 from the beta and I’ve hit a regression. ** ** JBoss seems to have been down for most of today so I haven’t been able to raise a Jira for it. ** ** In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren’t null. Eg Fact { ClassObject classField} ** ** Rule “xyz” When Fact(classField != null) Then … End ** ** This is giving the following exception ** ** Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87) at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204)* *** at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)* *** at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180) ... 149 more ** ** Wrapping the classField != null within an eval appears to be a work around. ** ** This is in the suspect method: *public* *boolean* evaluate(InternalWorkingMemory workingMemory, *final* InternalReadAccessor extractor, *final* Object object1, *final*FieldValue object2) { Object value1 = extractor.getValue( workingMemory, object1 ); Object value2 = object2.getValue(); *if* ( value2 == *null* ) { ClassFieldImpl classField = (ClassFieldImpl) object2;** ** value2 = classField.resolve( workingMemory ); } *return* *comparator*.equals( value1, value2 ); } ** ** I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with! ** ** ** ** Thomas -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 **