来自 dummyconstraintBuilder 类的 Drools 中出现 UnsupportedOperationException

问题描述 投票:0回答:1

我是 drools 新手,我在我的 gradle 文件中添加了以下依赖项。

implementation("org.drools:drools-compiler:9.44.0.Final")

implementation("org.drools:drools-core:9.44.0.Final")

对于基本规则 drl 文件,我从

UnsupportedOperationException
中得到了
dummyConstraintBuilder

我们的 Nexus 存储库中没有令人流口水的神器 - 专家。

我可以获得一些有关如何解决此问题的指导吗?

这是错误堆栈。

Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.

java.lang.UnsupportedOperationException
    at org.drools.compiler.rule.builder.ConstraintBuilder$DummyConstraintBuilder.setExprInputs(ConstraintBuilder.java:207)
    at org.drools.compiler.rule.builder.PatternBuilder.getExprBindings(PatternBuilder.java:1120)
    at org.drools.compiler.rule.builder.PatternBuilder.buildRelationalExpression(PatternBuilder.java:1105)
    at org.drools.compiler.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:983)
    at org.drools.compiler.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:955)
    at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:765)
    at org.drools.compiler.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:609)
    at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:177)
    at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:143)
    at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:125)
    at org.drools.compiler.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:66)
    at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:98)
    at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.internalAddRule(ImmutableRuleCompilationPhase.java:339)
    at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.addRule(ImmutableRuleCompilationPhase.java:334)
    at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.compileRulesLevel(ImmutableRuleCompilationPhase.java:298)
    at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.process(ImmutableRuleCompilationPhase.java:82)
    at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4204)
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileKnowledgePackages(KnowledgeBuilderImpl.java:461)
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.buildRules(KnowledgeBuilderImpl.java:1020)
    at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.doFirstBuildStep(KnowledgeBuilderImpl.java:994)
    at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:114)
    at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104)
    at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:270)
    at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:216)
    at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:80)
    at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:282)
    at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:248)
    at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:195)
java drools nexus drools-flow
1个回答
0
投票

您可以尝试添加

drools-mvel
依赖项。

© www.soinside.com 2019 - 2024. All rights reserved.