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

2009-09-04 Thread Lasse . Wallentin
Hi Marcel, 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

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

2009-08-15 Thread Simon Thum
Mark Proctor wrote: We'd really like to improve out OSGi friendlyness. From getting Drools to work perfectly as an OSGi service, to getting our build system to publish all the necessary bundles. But we need people in the commnity to help us, you know where to find us if you want to help out,

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

2009-08-14 Thread Lasse . Wallentin
Mark Proctor mproc...@codehaus.org wrote on 14-08-2009 03:13:42: We'd really like to improve out OSGi friendlyness. From getting Drools to work perfectly as an OSGi service, to getting our build system to publish all the necessary bundles. But we need people in the commnity to help us, you

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

2009-08-14 Thread ekke
lasse.wallen...@apcc.com schrieb: Mark Proctor mproc...@codehaus.org wrote on 14-08-2009 03:13:42: We'd really like to improve out OSGi friendlyness. From getting Drools to work perfectly as an OSGi service, to getting our build system to publish all the necessary bundles. But we need

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

2009-08-13 Thread Simon Thum
lasse.wallen...@apcc.com wrote: Ok, I finally got it running. I had missed an import in the excel sheet so I had a dependency on another bundle. Cool! All this debugging has made me understand (and appreciate) the solution sketched earlier by Faron Dutton more clearly. However it still

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

2009-08-13 Thread Mark Proctor
We'd really like to improve out OSGi friendlyness. From getting Drools to work perfectly as an OSGi service, to getting our build system to publish all the necessary bundles. But we need people in the commnity to help us, you know where to find us if you want to help out, as we have so much

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

2009-08-12 Thread Lasse . Wallentin
[...] Therefore, OSGi does not add that package to the bundle's ClassLoader and you get a ClassNotFoundException when Drools attempts to find the Class. Even when adding the Drools runtime jars in the bundle using them I run into problems. When using Drools (version 5.0.1) from within an

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

2009-08-12 Thread Simon Thum
Can anyone sketch a setup so that I can use Drools from within an Eclipse plugin? I've got it running. You need to make sure your classloaders are the right ones. I use the new PackageBuilderConfiguration(Classloader, Properties) ctor (if you're setting CL later, Properties may fail to apply)

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

2009-08-12 Thread Lasse . Wallentin
Lasse Wallentin | APC by Schneider Electric | Senior Software Developer Phone: ++45 72 190 134 | Mobile: ++45 41 37 7974 Email: lasse.wallen...@apc.com | Address: Silcon Allé 1, DK-6000 Kolding *** Please consider the environment before printing this e-mail

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

2009-08-12 Thread Lasse . Wallentin
I have tried the following: KnowledgeBuilderConfiguration builderConfiguration = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null, getClass().getClassLoader()); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(builderConfiguration); Resource

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

2009-07-08 Thread msully
Faron - I think I fixed my problem (and without the PackageBuilder stuff) but I think I cheated :) In my BundleListener, when I find a Bundle with an .rf file I want to compile, I do this: Create an instance of a new Classloader that first delegates class loading to my BundleListener's Bundle,

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

2009-06-19 Thread Faron Dutton
Let me start by saying that I am unfamiliar with Drools Flow but I encountered a similar issue when using Drools Expert in Eclipse, which is due to the ClassLoader behavior defined by OSGi v4. Drools attempts to access a Class through a reference to a ClassLoader, which by default is its bundle

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

2009-06-19 Thread msully
Thanks - I started to try something like this, but I found that Drools Package Builder was using its class classloader for the context - so I started to override it but Eclipse isn't letting me import PackageBuilder into my java class. When I tried getting drools working in OSGI, I found that

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

2009-06-19 Thread fgdutton
The only way that I have found that works is using Require-Bundle instead of Import-Package. This ensures that you can see all the classes in a 'split' package. ___ rules-users mailing list rules-users@lists.jboss.org

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

2009-06-19 Thread Mark Proctor
fgdut...@gmail.com wrote: The only way that I have found that works is using Require-Bundle instead of Import-Package. This ensures that you can see all the classes in a 'split' package. If someone is willing to work with us, we will do all the necessary changes to get everything working

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

2009-06-18 Thread msully
Update: The plot thickens. Sometimes when I'm importing my domain class in the rulesflow, it works, and sometimes it does not. This seems to be tied to the class loader that happens to be in the current thread context. Sometimes it is org.eclipse.core.runtime.internal.adaptor.ContextFinder and