繁体   English   中英

Eclipse中的drools插件Sample.drl显示错误

[英]drools plugin in Eclipse Sample.drl shows errors

我是Drools的新人。 我在Eclipse Neon中使用drools插件(6.4.0.Final)。 我按照向导创建了一个包含一些示例文件的drools项目。 完成这些步骤后,Eclipse突出显示了Sample.drl文件中两个规则的错误。 这是一个错误:

Multiple markers at this line
com.sample.DroolsTest.Message cannot be resolved to a type
org.drools.core.util.bitmask.AllSetBitMask cannot be resolved to a type
Only a type can be imported. com.sample.DroolsTest.Message resolves to a package
org.kie.api.runtime.rule.FactHandle cannot be resolved to a type
KnowledgeHelper cannot be resolved to a type
Only a type can be imported. org.drools.core.spi.KnowledgeHelper resolves to a package
Message.GOODBYE cannot be resolved to a type
org.kie.api.runtime.rule.RuleContext cannot be resolved to a type
java.lang.Exception cannot be resolved to a type

当我运行DroolsTest.java时,我收到以下错误:

java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=Sample.drl, line=15, column=0
text=Rule Compilation error Only a type can be imported.            com.sample.DroolsTest.Message resolves to a package
Only a type can be imported. org.drools.core.spi.KnowledgeHelper resolves to a package
KnowledgeHelper cannot be resolved to a type
org.kie.api.runtime.rule.FactHandle cannot be resolved to a type
java.lang.Exception cannot be resolved to a type
org.kie.api.runtime.rule.RuleContext cannot be resolved to a type], Message [id=2, level=ERROR, path=Sample.drl, line=5, column=0
text=Rule Compilation error Only a type can be imported.     com.sample.DroolsTest.Message resolves to a package
Only a type can be imported. org.drools.core.spi.KnowledgeHelper resolves to a package
KnowledgeHelper cannot be resolved to a type
com.sample.DroolsTest.Message cannot be resolved to a type
org.kie.api.runtime.rule.FactHandle cannot be resolved to a type
org.kie.api.runtime.rule.FactHandle cannot be resolved to a type
java.lang.Exception cannot be resolved to a type
org.kie.api.runtime.rule.RuleContext cannot be resolved to a type
Message.GOODBYE cannot be resolved to a type
org.drools.core.util.bitmask.AllSetBitMask cannot be resolved to a type
com.sample.DroolsTest.Message cannot be resolved to a type]]
at  org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:450)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:604)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:575)

这似乎是一个库路径问题。 任何帮助表示赞赏。

非常感谢你!

这是Neon或drools插件中的一个错误,它基于此站点在drools插件(6.5.0.Final)中修复: jboss-issue-description

但由于我没有发现6.5.0.Final版本发布,你可以通过降低eclipse到火星来解决这个问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM