[rules-users] Drools 5.0 - can't make it use Janino compiler - always wants eclipse jar

Martin Smith msmith999999 at gmail.com
Thu Dec 31 04:57:12 EST 2009


Hi folks,

I'm doing some very basic evaluation of Drools and can't get past the
first hurdle - the hello world example. I get this:

......
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:94)
       at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:55)
       at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:270)

I'm not using Eclipse, my IDE is netbeans 6.8. I get the same error
running the compiled jar from outside netbeans as well so I don't
think it's related to the IDE.

I modified the example by adding a knowledge builder config and then this:

kconfig.setProperty("drools.dialect.java.compiler", "JANINO");

This had no effect. I rewrote the example to use a package builder and
set the compiler property on it to JANINO. Again, it didn't work. I
also tried passing a -Dproperty with the same thing. Again, no effect.

I have the janino jar from the download on the classpath along with
the other jars it says are necessary.

It works if I download and add the eclipse jar to the classpath but I
don't want to do this as I don't want my runtime app to depend on
pieces of eclipse.

I'm out of time and ideas now so asking for help here. These are the
drools related jars I have in the project:

antlr-runtime-3.1.1.jar
drools-api-5.0.1.jar
drools-compiler-5.0.1.jar
drools-core-5.0.1.jar
joda-time-1.6.jar
mvel2-2.0.10.jar
janino-2.5.15.jar
xstream-1.3.1.jar

Thanks,

Martin



More information about the rules-users mailing list