Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1167

Comparison operation error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 6.4.0.Final
    • None
    • None
    • OracleLinux 6, Java 7/8

    • NEW
    • NEW

      I migrated a set of rules from version 5.4 to 6.3. All rules are "Technical rules".
      After migration, I get the following error

      _Unable to Analyse Expression value != 0: [Error: Comparison operation requires compatible types. Found class org.mvel2.util.MethodStub and class java.lang.Integer] [Near :

      {... value != 0 ....}

      ] ^ [Line: 29, Column: 9]
      _

      on the following line of a rule

      $imponibile : RuleElement(label=="IMPONIBILE", value != 0, imponibile : value, imponibile_artmap : artmap);

      RuleElement is a model class (loaded as a dependency) and declares a value attribute like

      private Double value;

      The same rule compiled without problems in 5.4.

      Thanks

        1. failing_rule.drl
          3 kB
          Pierangelo Repetti

              mfusco@redhat.com Mario Fusco
              prepetti_jira Pierangelo Repetti (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: