[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin... ]
Lajos Incze edited comment on DROOLS-469 at 4/30/14 10:48 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 seems to arise when the engine tries to find a matching rule for the newly inserted fact.
The error:
{quote}
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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
{quote}
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
{quote}
public enum Types {
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
PERIOD_AGENDA_ACCOUNTING,
...
AMOUNT_PERCENT, AMOUNT_HUF, AMOUNT_COUNTER
}
{quote}
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"
{quote}
<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>
{quote}
was (Author: incze):
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 seems to arise when the engine tries to find a matching rule for the newly inserted fact.
The error:
{quote}
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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
{quote}
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
public enum Types {
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
PERIOD_AGENDA_ACCOUNTING,
...
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)
10 years, 5 months
[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin... ]
Lajos Incze edited comment on DROOLS-469 at 4/30/14 10:46 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 seems to arise when the engine tries to find a matching rule for the newly inserted fact.
The error:
{quote}
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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
{quote}
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
public enum Types {
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
PERIOD_AGENDA_ACCOUNTING,
...
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. 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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
public enum Types {
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
PERIOD_AGENDA_ACCOUNTING,
...
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)
10 years, 5 months
[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin... ]
Lajos Incze edited comment on DROOLS-469 at 4/30/14 10:35 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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
public enum Types {
PERIOD_SCORE_CALCULATION, PERIOD_SCORE_MEASUREMENT,
PERIOD_AGENDA_ACCOUNTING,
...
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. 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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
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)
10 years, 5 months
[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin... ]
Lajos Incze edited comment on DROOLS-469 at 4/30/14 10:33 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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
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. 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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
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)
10 years, 5 months
[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin... ]
Lajos Incze edited comment on DROOLS-469 at 4/30/14 10:31 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)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1148)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:223)
at org.drools.core.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:217)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362.defaultConsequence(Rule_Calculate_commission282155362.java:8)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at hu.f400.scoring.rules.Rule_Calculate_commission282155362DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:70)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
at hu.f400.scoring.CommissionCalculationTest.testSuccessfulCommissionCalculation(CommissionCalculationTest.java:90)
---
The Types class, is an bare public enum (constants to name things), nothing special, sg. like below, and is used at LHS matching predicates with == operator when testing equality. The error seems to arise when the engine tries to find an matching rule for the newly inserted object.
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. 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>
> 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)
10 years, 5 months
[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ 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)
10 years, 5 months
[JBoss JIRA] (DROOLS-469) NoSuchMethodError at runtime while comparing org.joda.time.DateTime instances
by Lajos Incze (JIRA)
[ https://issues.jboss.org/browse/DROOLS-469?page=com.atlassian.jira.plugin... ]
Lajos Incze commented on DROOLS-469:
------------------------------------
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)
10 years, 5 months