[rules-users] NoClassDefFoundError for

Mark Proctor mproctor at codehaus.org
Fri Aug 24 10:35:41 EDT 2007


Your classpath is totaly wrong half that stuff isn't needed, our 
probably confusing the system. you should read this document 
http://anonsvn.labs.jboss.com/labs/jbossrules/tags/4.0.0.13773GA/README_DEPENDENCIES.txt

For runtime, drools-core, the only dependency needed is MVEL. For 
drools-compiler you only need antlr-runtime and either/both janino and 
jdt-core. Thats it.

Obviously there are other deps if you need jsr94 or decision tables, but 
they are noted in that README.

And for the love of god don't include different versions of the same 
thing - i.e. stuff like below.
mvel14-1.2rc1.jar
mvel14-1.2rc1rv805.jar
drools-core-4.0.0.jar
drools-core-4.0.1.SNAPSHOT.jar

Mark


MarkA wrote:
> Using the simple files (based on the examples) I cannot get it to run outside
> of eclispe. Can anyone suggest any solution? Below is the command I am using
> at the moment (though I have tried lots of permutations, including putting
> every jar I can find in the JAR directory and running the code direct rather
> than from a jar. Other code works fine and this one runs until it gets to
> the PackageBuilder bit so pretty sure it's not related to the jar). I've
> also listed the current contents of the JAR directory, I have tried lots of
> other combinations and am stumped as to what to try next. Drools looks good
> but if I can't produce a single jar that other people can use then it's
> completely pointless.
>
> This one is on Windows XP but it doesn't work on the Mac either or on
> Windows XP inside the Macs emulator (Parallels). Same result everywhere.
>
> E:\eclipse-Data\drools-test-mini>java -jar DroolsTester.jar -cp .:JAR
> Loading rules
> Loaded rules
> RULES000
> java.lang.NoClassDefFoundError: org/drools/compiler/PackageBuilder
>         at com.mda.dt.DroolsTest.readRule(DroolsTest.java:38)
>         at com.mda.dt.DroolsTest.RunME(DroolsTest.java:107)
>         at com.mda.dt.DroolsTest.main(DroolsTest.java:20)
>
> E:\eclipse-Data\drools-test-mini>ls JAR
> antlr-2.7.6.jar
> antlr-runtime-3.0.jar
> commons-jci-core-1.0-406301.jar
> commons-jci-eclipse-3.2.0.666.jar
> commons-lang-2.1.jar
> commons-logging-api-1.0.4.jar
> core-3.2.3.v_686_R32x.jar
> drools-compiler-4.0.0.jar
> drools-compiler-4.0.1.SNAPSHOT.jar
> drools-core-4.0.0.jar
> drools-core-4.0.1.SNAPSHOT.jar
> drools-decisiontables-4.0.0.jar
> drools-decisiontables-4.0.1.SNAPSHOT.jar
> drools-jsr94-4.0.0.jar
> drools-jsr94-4.0.1.SNAPSHOT.jar
> janino-2.5.7.jar
> jsr94-1.1.jar
> jxl-2.4.2.jar
> lib
> mvel14-1.2rc1.jar
> mvel14-1.2rc1rv805.jar
> stringtemplate-2.3b6.jar
> unused.zip
> xercesImpl-2.4.0.jar
> xml-apis-1.0.b2.jar
> xpp3-1.1.3.4.O.jar
> xstream-1.1.3.jar
>   




More information about the rules-users mailing list