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 yo

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

2009-08-20 Thread Marcel Casado
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 abou

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 ekke
lasse.wallen...@apcc.com schrieb: Mark Proctor 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

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

2009-08-13 Thread Lasse . Wallentin
Mark Proctor 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 know where to find

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 oth

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 s

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); > Resourc

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 rules-users-boun...@lis

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

2009-08-12 Thread Simon Thum
lasse.wallen...@apcc.com wrote: >>> 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 (i

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

2009-08-12 Thread Lasse . Wallentin
> > 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 m

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
> [...] 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 O

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, an

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 proper

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 https://lists.jboss.org/mailman/l

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 sev

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 Cla

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

2009-06-18 Thread msully
Here's the ClassLoader that let's the import work: org.springframework.osgi.util.BundleDelegatingClassLoader OK, I realize this is starting to seem like a question for another board, but I figured I'd put all the info here since I started here. If I find the solution elsewhere, I'll share here.

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