Hi there,
we tried to use drools jars from an url:
1. define an URLClassLoader with all the urls of the necessary drools jars
in the search path.
2. initialize a KnowledgeBaseConfiguration with that class loader
KnowledgeBaseConfiguration knowledgeBaseCfg = KnowledgeBaseFactory
.newKnowledgeBaseConfiguration(null, dcURLClassLoader);
3. initialize a KnowledgeBase with that configuration
KnowledgeBase kbase = KnowledgeBaseFactory
.newKnowledgeBase(knowledgeBaseCfg);
4. initialize a KnowledgeBuilderConfiguration with that class loader
KnowledgeBuilderConfiguration knowledgeBuilderCfg =
KnowledgeBuilderFactory
.newKnowledgeBuilderConfiguration(null, dcURLClassLoader);
5. initalize a knowledge builder
kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kbase,
knowledgeBuilderCfg);
6. adding a knowledge resource to that builder results in a
org.drools.RuntimeDroolsException "Unable to load dialect
org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java" if the
drools jars are not in the start class path.
Did we something wrong or uses drools while adding ressources a classloader
different from that given in the configuration?.
Thanks in advance
Ulrich
--
View this message in context:
http://drools.46999.n3.nabble.com/loading-rules-and-drools-classes-via-UR...
Sent from the Drools: User forum mailing list archive at
Nabble.com.