logo       

Re: [drools-user] JBoss Rules WokingMemoryLogger and generics: a bug?: msg#00099

java.drools.user

Subject: Re: [drools-user] JBoss Rules WokingMemoryLogger and generics: a bug?

that defaintely sounds like a bug - want to log it in a JIRA?

If it was not allowed in a drl, it would complain at compile time, and you would not be able to run the rules.

On 12/14/06, Dandrea Francesco <francesco.dandrea@xxxxxxxxxxxxxxxx> wrote:
Hi all,
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)


Is this a bug? Or the generics are not supported and this is the reason < is not allowed in the rule file?
Attached there is the example application.... I simply zipped the Eclipse Project Directory... I hope this is the right thing to do, if not please redirect me to the right place...
Thanks in advance....



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.18/584 - Release Date: 12/12/2006 23.17


--------------------------------------------------------------------

CONFIDENTIALITY NOTICE

This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to webmaster@xxxxxxxxxxxxxxxx.

        Thank you

                                        www.telecomitalia.it

--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise