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-tp4034413p4034421.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to