[jboss-jira] [JBoss JIRA] (DROOLS-37) Operators on java.lang.Comparable object doesn't work if JIT is enable

Jérémy SOULA (JIRA) jira-events at lists.jboss.org
Tue Feb 12 08:58:56 EST 2013


     [ https://issues.jboss.org/browse/DROOLS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jérémy SOULA updated DROOLS-37:
-------------------------------

    Attachment: drools-bugs.zip


I join a test project of this bug
                
> Operators on java.lang.Comparable object doesn't work if JIT is enable
> ----------------------------------------------------------------------
>
>                 Key: DROOLS-37
>                 URL: https://issues.jboss.org/browse/DROOLS-37
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.5
>         Environment: Windows XP
> Java 1.5
> joda-time 1.6.2
>            Reporter: Jérémy SOULA
>            Assignee: Mark Proctor
>              Labels: 5.5, comparable, localDate
>         Attachments: drools-bugs.zip
>
>
> In my application, i have rules that used org.joda.time.LocalDate to compare date like infDate>=supDate.
> With Drools 5.3, all works fine.
> With Drools 5.5, an exception occured when JIT optimizer is enabled:
> Exception in thread "main" java.lang.NoSuchMethodError: org.joda.time.LocalDate.compareTo(Lorg/joda/time/LocalDate;)I
> 	at ConditionEvaluatorf8ba8fa3003345adbf3979e901488f23.evaluate(Unknown Source)
> 	at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
> 	at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
> 	at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
> 	at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
> 	at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
> 	at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
> 	at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
> 	at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
> 	at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
> 	at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> 	at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> 	at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:304)
> 	at fr.jsoula.jboss.drools.bugs.comparable.ComparableBug.main(ComparableBug.java:39)
> After search, it seems that the bytecode generated by org.drools.rule.builder.dialect.asm.ClassGenerator can't call the method  public int compareTo(Object partial) of org.joda.time.LocalDate. The parameter of the method must be the same class of the current object.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list