May I ask you please to open a JIRA for that?

   Thanks,
    Edson

2008/1/16, Gattiker, Alexandre <Alexandre.Gattiker@generali.ch >:
Sorry, the bug's still there on Drools 4.0.4 and MVEL 1.2.21. Line numbers are now as follows:

Caused by: java.lang.UnsupportedOperationException: does not support method call isAllowed(Object object, InternalWorkingMemory workingMemoiry)
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java :181)
at org.drools.rule.OrCompositeRestriction.isAllowed(OrCompositeRestriction.java:20)
...

Alexandre

-----Message d'origine-----
De : rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]De la part de Edson Tirelli
Envoyé : mercredi, 16. janvier 2008 12:07
À : Rules Users List
Objet : Re: [rules-users] Can't call static method in 'in' compoundrestriction?



   Alexandre,

   Can you please update to Drools 4.0.4 and MVEL 1.2.21 and let us know if the problem persists?
   There were a lot of bug fixes from 4.0.2 to 4.0.4.

   []s
   Edson


2008/1/16, Gattiker, Alexandre <Alexandre.Gattiker@generali.ch>:
Thanks a lot, Edson, for the quick reply yesterday. Here's another one. The following rule compiles, but Drools crashes upon insertion of an object. Same when calling a static method instead of a constructor.

(Based on the Eclipse sample rule project)

rule "rule1"
        when
                $p1:Message(
                        message in (
                                (new String("A")),
                                (new String("B"))
                        )
                )
        then
                System.out.println("foo");
end


java.lang.UnsupportedOperationException : does not support method call isAllowed(Object object, InternalWorkingMemory workingMemoiry)
        at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:177)
        at org.drools.rule.OrCompositeRestriction.isAllowed (OrCompositeRestriction.java:20)
        at org.drools.rule.MultiRestrictionFieldConstraint.isAllowed (MultiRestrictionFieldConstraint.java:70)
        at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:132)
        at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java :22)
        at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
        at org.drools.reteoo.Rete.assertObject (Rete.java:177)
        at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java :192)
        at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
        at org.drools.common.AbstractWorkingMemory.insert (AbstractWorkingMemory.java:886)
        at org.drools.common.AbstractWorkingMemory.insert (AbstractWorkingMemory.java:858)
        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)
        at com.sample.DroolsTest.main(DroolsTest.java:28)

I'm on drools 4.0.2 and mvel14-1.2.8.

Alexandre

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com