Drools项目抛出" Eclipse JDT Core jar不在类路径中#34;

时间:2017-06-01 15:29:23

标签: eclipse drools eclipse-jdt

当我在Eclipse中运行示例Drools项目时,它会抛出异常" Eclipse JDT Core jar不在类路径中#34;。我手动创建了Drools 6运行时。我错过了什么吗?

完整的堆栈跟踪

org.drools.core.RuntimeDroolsException: Unable to load dialect 'org.drools.compiler.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.compiler.rule.builder.dialect.java.JavaDialectConfiguration'
    at org.drools.compiler.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:360)
    at org.drools.compiler.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:346)
    at org.drools.compiler.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:228)
    at org.drools.compiler.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:196)
    at org.drools.compiler.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:152)
    at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:166)
    at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:244)
    at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:204)
    at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:347)
    at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:322)
    at com.sample.ProcessTest.main(ProcessTest.java:17)
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath
    at org.drools.compiler.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:100)
    at org.drools.compiler.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:61)
    at org.drools.compiler.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:356)
    ... 10 more

2 个答案:

答案 0 :(得分:1)

你错过了Ecliose jdt核心罐。添加yhat jar,它应该工作。

答案 1 :(得分:0)

将org.eclipse.jdt.core-3.7.1.jar文件添加到项目的构建路径中,它完全正常。不知道为什么这不是我手动创建的Drools运行时的一部分。