[rules-users] loading rules and drools classes via URLClassLoader
ukriegel
ulrich.kriegel at isst.fraunhofer.de
Fri Nov 18 10:37:38 EST 2011
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-URLClassLoader-tp3518898p3518898.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list