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
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/2156.html