[rules-users] OSGI, classloading, and imports in KnowledgeBuilder

Lasse.Wallentin at APCC.com Lasse.Wallentin at APCC.com
Wed Aug 12 16:30:22 EDT 2009


> 
> I have tried the following:
> 
> KnowledgeBuilderConfiguration builderConfiguration = 
> KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null, 
> getClass().getClassLoader());
> KnowledgeBuilder kbuilder = 
> KnowledgeBuilderFactory.newKnowledgeBuilder(builderConfiguration);
> Resource pathResource = ResourceFactory.newClassPathResource(path, 
> getClass());
> kbuilder.add(pathResource, ResourceType.DTABLE, dtableconfiguration);
> 
> However it still fails ...
> 
> Does this compare to what you are doing? Are you able to do 
DecisionTables 
> as well?

Ok, I finally got it running. I had missed an import in the excel sheet so 
I had a dependency on another bundle.

All this debugging has made me understand (and appreciate) the solution 
sketched earlier by Faron Dutton more clearly. However it still seems a 
bit involved when just a few decisiontables is needed - don't you think?

regards

Lasse



More information about the rules-users mailing list