Hi, I'm migrating my system from Drools 4.0.7 to Drools 5.1.0.
Now when I try to compile rules that check fact fields, I get the
following exception:
ERROR: EventDispatcher: Error during dispatch.
(java.lang.NoClassDefFoundError:
org/drools/base/extractors/BaseObjectClassFieldReader)
java.lang.NoClassDefFoundError:
org/drools/base/extractors/BaseObjectClassFieldReader
(
http://paste2.org/p/296380 )
It seems the classloaders I pass to the configurations are not taken in
account... I get exactly the same error if I do not specify the
classloaders. Here is the code:
KnowledgeBuilderConfiguration kBuilderCfg =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null,classLoader);
KnowledgeBuilder knowledgeBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder(kBuilderCfg);
KnowledgeBaseConfiguration kbaseConfig =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null,multiBundleClassLoader);
kbaseConfig.setOption(EventProcessingOption.STREAM);
knowledgeBase =
KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);
On Drools 4, we did exactly the same with PackageBuilder instead of
KnowledgeBuilder and RuleBase for KnowledgeBase. So the classloaders I
pass are the good ones... Is there some trick ?
Thanks for any help !