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

NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.1.0.Beta4
    • 6.0.1.Final
    • None
    • None

      Given the following rule:


      import org.joda.time.DateTime;

      rule "in the past"
      when
      exists DateTime( this < new DateTime() )
      then
      System.out.println("in the past");
      end

      I obtain this exception at runtime while comparing a large number of DateTimes:

      // java.lang.NoSuchMethodError: org.joda.time.DateTime.compareTo(Lorg/joda/time/DateTime;)I
      // at ConditionEvaluatorc959ae5f82e8456f9e4f2d8b7e07b19d.evaluate(Unknown Source)
      // at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:217)
      // at org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:174)
      // at org.drools.core.phreak.PhreakFromNode.checkConstraintsAndPropagate(PhreakFromNode.java:298)
      // at org.drools.core.phreak.PhreakFromNode.doLeftInserts(PhreakFromNode.java:101)
      // at org.drools.core.phreak.PhreakFromNode.doNode(PhreakFromNode.java:49)
      // at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:348)
      // at org.drools.core.phreak.RuleNetworkEvaluator.doRiaNode(RuleNetworkEvaluator.java:604)
      // at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:528)
      // at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334)

              mfusco@redhat.com Mario Fusco
              dfa_jira Davide Angelocola (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: