They're just dropped in the deploy folder along with the bundle that causes 
it's execution during Blueprint initialization.  Nope, no activation policy.

Everything goes swimmingly until the one class tries to get it's BundleContext 
using FrameworkUtil.  I think I'll try to run it in Eclipse/Equinox again when 
I get a chance just to see what happens.  It's been a while since I've tried it 
like that.

Scott

-----Original Message-----
From: David Jencks [mailto:[email protected]] 
Sent: Thursday, July 24, 2014 12:02 PM
To: [email protected]
Subject: Re: Null BundleContext in class

I recall having this problem years ago but don't remember the cause.  I don't 
think defining a bundle activator will help.  How are you installing these 
bundles?  Do any of them have an activation policy in the manifest?  I would 
think that installing them all via a karat feature would result in them all 
getting started, but I haven't used karat in years and am not 100% sure.

david jencks

On Jul 24, 2014, at 8:45 AM, "Leschke, Scott" <[email protected]> wrote:

> Yes, they are.  I've used DataNucleus without problems in the past in 
> Eclipse/Equinox .  I've also looked at the MANIFEST.MF files to check the 
> IMPORT/EXPORT-PACKAGE clauses.
> 
> I just think that the class in question is loaded and executing in the 
> RESOLVED state, which is possible/valid I guess.  I guess I always assumed 
> that the first class to load in a bundle would be the activator if it's 
> specified.
> 
> Assuming that's the case, it would seem that the only way for a class to 
> guarantee that it can get access to its BundleContext is to declare an 
> activator and do it after the activator runs.
> 
> -----Original Message-----
> From: jkraushaar [mailto:[email protected]]
> Sent: Thursday, July 24, 2014 2:17 AM
> To: [email protected]
> Subject: RE: Null BundleContext in class
> 
> Hi Scott,
> 
> are you sure that both bundles are valid OSGi bundles? I had similar problems 
> in the past when I've installed JAR without OSGi meta informations.
> The framework told me that it has the state ACTIVE, but it was not a bundle 
> at all.
> 
> Regards
> Jochen
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Null-BundleContext-in-class-tp403441
> 3p4034421.html Sent from the Karaf - User mailing list archive at 
> Nabble.com.

Reply via email to