[
https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin...
]
Lajos Incze edited comment on DROOLS-469 at 4/30/14 10:18 PM:
--------------------------------------------------------------
I experience the very same issue, but with enum class, not joda time. The error occurs
randomly, the test sometimes runs, sometime fails with this error. I allways use
mvn clean test
the test inserts 2 test facts (defined by constants) into an empty stateful knowledge
session, and a result fact should be inserted when the rule fires.
The error:
---
testSuccessfulCommissionCalculation(hu.f400.scoring.CommissionCalculationTest) Time
elapsed: 0.01 sec <<< ERROR!
java.lang.NoSuchMethodError:
hu.f400.scoring.rules.facts.Types.<init>(Ljava/lang/String;)V
at ConditionEvaluatorb5a0186943d94105a8e9f6ca7550bc45.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.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:387)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg.
like this:
public enum Types {
// PeriodType types
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
// AGENDA periods
PERIOD_AGENDA_ACCOUNTING,
...
// AmountDimension types
AMOUNT_PERCENT, AMOUNT_HUF, AMOUNT_COUNTER
}
Environment:
-----------------
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
Maven home: /home/inc/apps/apache-maven-3.0.5
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.11.2.el6.x86_64", arch:
"amd64", family: "unix"
<properties>
<kie.version>6.0.1.Final</kie.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${kie.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${kie.version}</version>
</dependency>
was (Author: incze):
I experience the very same issue, but with enum class, not joda time:
---
testSuccessfulCommissionCalculation(hu.f400.scoring.CommissionCalculationTest) Time
elapsed: 0.01 sec <<< ERROR!
java.lang.NoSuchMethodError:
hu.f400.scoring.rules.facts.Types.<init>(Ljava/lang/String;)V
at ConditionEvaluatorb5a0186943d94105a8e9f6ca7550bc45.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.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:387)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg.
like this:
public enum Types {
// PeriodType types
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
// AGENDA periods
PERIOD_AGENDA_ACCOUNTING,
...
// AmountDimension types
AMOUNT_PERCENT, AMOUNT_HUF, AMOUNT_COUNTER
}
Environment:
-----------------
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
Maven home: /home/inc/apps/apache-maven-3.0.5
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.11.2.el6.x86_64", arch:
"amd64", family: "unix"
<properties>
<kie.version>6.0.1.Final</kie.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${kie.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${kie.version}</version>
</dependency>
NoSuchMethodError at runtime while comparing org.joda.time.DateTime
instances
-----------------------------------------------------------------------------
Key: DROOLS-469
URL:
https://issues.jboss.org/browse/DROOLS-469
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 6.0.1.Final
Environment: OS: Macosx 10.9.2
Java version: 1.6.0_65, vendor: Apple Inc.
Reporter: Davide Angelocola
Assignee: Mark Proctor
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)
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)