当前位置: 首页 > 工具软件 > JDT Core > 使用案例 >

The Eclipse JDT Core jar is not in the classpath

陈增
2023-12-01

 http://msq.iteye.com/blog/683074

在操作Drools的测试例子时,Eclipse后台报以下错误:
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:160)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:146)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:121)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:98)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:124)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:86)
at com.sample.DecisionTableTest.readDecisionTable(DecisionTableTest.java:58)
at com.sample.DecisionTableTest.main(DecisionTableTest.java:35)
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:91)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:52)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:156)
... 7 more

主要是缺少一个jar包:org.eclipse.jdt.core_3.3.1.v_780_R33x.jar而引起的。

 

Drools报错:java.lang.NoClassDefFoundError: org/antlr/runtime/CharStream

java.lang.NoClassDefFoundError: org/antlr/runtime/CharStream
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:292)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:457)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:30)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:40)
at com.sample.DroolsTest.main(DroolsTest.java:23)

---------------------------------------------------------------------------------------------------------------------------

解决办法:

把drools自带的antlr包加进去就ok了

对于5.0版本:

Drools 5.0.0.M4\drools-5.0.0.M4-bin\lib\antlr-runtime-3.1.1.jar

 

 

=========

class not found:org/mvel2/integration/VariableResolverFactory

加入包mvel2.java

 类似资料:

相关阅读

相关文章

相关问答