[rules-users] OSGI, classloading, and imports in KnowledgeBuilder
Marcel Casado
marcel at ucar.edu
Thu Aug 20 18:34:09 EDT 2009
Hi Lasse,
I'm running into the exact same problem as you did. I have an OSGI bundle
where I embed Drools and all the dependencies and I'm deploying it on FUSE
4.0 . I tried passing the classloader posted on this thread to Drools but
still the same problem. I don't understand when you talk about the imports
where they should be placed and which imports.
I'm kind of desperate since I have a deadline next week and I don't know
what else to try. I will appreciate a lot if you could give me some help on
get this working like posting some code about your solution.
> 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.
Thanks in advance,
-Marcel
--
View this message in context: http://www.nabble.com/OSGI%2C-classloading%2C-and-imports-in-KnowledgeBuilder-tp24099671p25071286.html
Sent from the drools - user mailing list archive at Nabble.com.
More information about the rules-users
mailing list