[jboss-jira] [JBoss JIRA] Closed: (JBRULES-589) WokingMemoryLogger and generics: ClassCastException

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Fri Jul 6 14:48:53 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-589?page=all ]

Edson Tirelli closed JBRULES-589.
---------------------------------

    Fix Version/s:  4.0.0.MR4
       Resolution: Out of Date

I just tested your sample project against 4.0MR3 and the problem is solved.
As we will release 4.0 final in a few days, we will not solve this in old 3.0.x branch.

If you are a JBoss Rules subscriber and need a backport of the fix to 3.0.x branch, please contact the support team through customer portal.


> 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: Edson Tirelli
>             Fix For:  4.0.0.MR4
>
>         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

        



More information about the jboss-jira mailing list