WokingMemoryLogger and generics: ClassCastException
---------------------------------------------------
Key: JBRULES-589
URL:
http://jira.jboss.com/jira/browse/JBRULES-589
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.5
Environment: Java 1.5.0_9
Reporter: Francesco Dandrea
Assigned To: Mark Proctor
Attachments: BacoJBossRules.zip
I'm using Jboss Rules 3.0.5 and Java 1.5.0_09.
I'm using generics, but I see that I can't have the character < in a Fact in te
drl. This is not a problem, I derived my generic class, and the new derived one is not a
Generic class...
(public class MyClassCiccio extends Ciccio<MyClass>{})
Now, when I execute the application without log it works. But when I instantiate a
WorkingMemoryLogger I have a ClassCastException:
Exception in thread "main" java.lang.ClassCastException:
it.telecomitalia.netbox.MeasureAlarm
at org.drools.base.it.telecomitalia.netbox.TfAlarm$getReferencedElement.getValue(Unknown
Source)
at org.drools.base.ClassFieldExtractor.getValue(Unknown Source)
at org.drools.rule.Declaration.getValue(Unknown Source)
at org.drools.audit.WorkingMemoryLogger.extractDeclarations(Unknown Source)
at org.drools.audit.WorkingMemoryLogger.activationCreated(Unknown Source)
at org.drools.event.AgendaEventSupport.fireActivationCreated(Unknown Source)
at org.drools.reteoo.TerminalNode.assertTuple(Unknown Source)
at org.drools.reteoo.TerminalNode.assertTuple(Unknown Source)
at org.drools.reteoo.TupleSource.propagateAssertTuple(Unknown Source)
at org.drools.reteoo.NotNode.assertTuple(Unknown Source)
at org.drools.reteoo.LeftInputAdapterNode.createAndAssertTuple(Unknown Source)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
at org.drools.reteoo.ObjectTypeNode.assertObject(Unknown Source)
at org.drools.reteoo.Rete.assertObject(Unknown Source)
at org.drools.reteoo.ReteooRuleBase.assertObject(Unknown Source)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at it.telecomitalia.netbox.Main.main(Main.java:34)
I have an example (sent to the mailing list) that gives the exception, but
--
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