NoClassDefFoundError when embedding felix

2011-04-04 Thread adrian.p.smith
Hopefully someone can help me with this problem that is stopping me from progressing with Felix ? I have a simple bundle based on the example DictionaryBundle in the examples with the added complexity of an embedded jar file, is this case commons-lang.jar. I can install and start the bundle

Re: NoClassDefFoundError when embedding felix

2011-04-04 Thread Richard S. Hall
You're not really giving enough information. How about showing us your manifest file and the contents of your bundle JAR file? - richard On 4/4/11 7:35, adrian.p.sm...@bt.com wrote: Hopefully someone can help me with this problem that is stopping me from progressing with Felix ? I have a

RE: NoClassDefFoundError when embedding felix

2011-04-04 Thread adrian.p.smith
Absolutely The bundle manifest: Bundle-Name: English dictionary Bundle-Description: A bundle that registers an English dictionary service Bundle-Vendor: Apache Felix Bundle-ClassPath: commons-lang-2.3.jar, . Bundle-Version: 1.0.0 Bundle-Activator: com.bt.test.DictionaryActivator

RE: NoClassDefFoundError when embedding felix

2011-04-04 Thread adrian.p.smith
OK, so my colleague seems to have a resolution; 1. We have separated the packages of the bundle and the host application and amended the manifest accordingly: Bundle-Name: English dictionary Bundle-Description: A bundle that registers an English dictionary service Bundle-Vendor: Apache Felix

Re: NoClassDefFoundError when embedding felix

2011-04-04 Thread Simon Chemouil
Hi, Any reason you're not using the standard way to embed OSGi containers as nicely described there: http://njbartlett.name/2011/03/07/embedding-osgi.html ? Or are you stuck with a Java version anterior to 1.6? Regarding the NCDFE, the error you have says some bundle is trying to load

RE: NoClassDefFoundError when embedding felix

2011-04-04 Thread adrian.p.smith
Hi Simon, Thanks for the link which has some very concise information. Actually my code does basically follow that exact pattern. WRT the NCDFE, as I understand it, there should be no need to import packages for embedded jars and this seems to be confirmed by the fact that the bundle works

Re: Settings Service PID with FileInstall

2011-04-04 Thread Carlos Quiroz
Hi Thanks for the answer. I don't really get why there is this behavior. I get that if you don't have a PID ConfigAdmin should generate one but why not being able to specify one is kind of strange. For example with this behavior I cannot use the metatype which requires the PID be placed on

Re: Settings Service PID with FileInstall

2011-04-04 Thread Achim Nierbeck
Hi Guillaume, just because out of curiosity, where in the spec is it defined how the PID is generated? I just found the following in the current 4.2 spec: quote When a Configuration object for a Managed Service Factory is created (ConfigurationAdmin.createFactoryConfiguration), a new unique PID

Re: NoClassDefFoundError when embedding felix

2011-04-04 Thread Angelo van der Sijpt
Hi Adrian, Hm, I'm not entirely sure what the problem is, but it it seems very likely that the Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA=com.bt.test; version=1.0.0 you set has something to do with it, especially because the problem goes away when your bundle has its own package set to something

accessing gogo from a bundle

2011-04-04 Thread Donald Whytock
Hi all... I'd like to execute felix shell commands from inside a bundle. Used to was, that was done with org.apache.felix.shell.ShellService. I assume it's done now using org.apache.felix.service.command.CommandSession, fetched from org.apache.felix.service.command.CommandProcessor. But I

Re: accessing gogo from a bundle

2011-04-04 Thread Richard S. Hall
You have to import it with status=provisional, since the Gogo API is based on unreleased OSGi API, so it will change in the future and we are warning you about this by making the status attribute mandatory. - richard On 4/4/11 17:17, Donald Whytock wrote: Hi all... I'd like to execute felix

Re: accessing gogo from a bundle

2011-04-04 Thread Donald Whytock
Okay, I've tried the following: org.apache.felix.service.command;status=provisional;version=0.8.0 and on load it comes up with missing requirement package; ($(package=org.apache.felix.service.command)(version=0.8.0)) On Mon, Apr 4, 2011 at 5:22 PM, Richard S. Hall he...@ungoverned.org wrote:

Re: accessing gogo from a bundle

2011-04-04 Thread Richard S. Hall
Not sure. If I look at the Gogo Command bundle, it does this in its manifest: Import-Package: org.apache.felix.service.command;status=provisional;ve rsion=0.8,org.osgi.framework;version=1.5,org.osgi.service.log;ver sion=1.3,org.osgi.service.packageadmin;version=1.2,org.osgi.servi

Re: Settings Service PID with FileInstall

2011-04-04 Thread Guillaume Nodet
@Achim: This would not really guarantee a new unique PID if you can give it ... @Carlos: Not sure about the meta-type, but I suppose it should use the factory pid instead of factory based configurations? On Mon, Apr 4, 2011 at 22:59, Achim Nierbeck bcanh...@googlemail.com wrote: Hi Guillaume,

Re: accessing gogo from a bundle

2011-04-04 Thread Richard S. Hall
p.s. If you really can't figure it out, you can send me an example failing bundle and I will look at it. On 4/4/11 17:42, Richard S. Hall wrote: Not sure. If I look at the Gogo Command bundle, it does this in its manifest: Import-Package:

Re: NoClassDefFoundError when embedding felix

2011-04-04 Thread Richard S. Hall
On 4/4/11 9:29, adrian.p.sm...@bt.com wrote: Absolutely The bundle manifest: Bundle-Name: English dictionary Bundle-Description: A bundle that registers an English dictionary service Bundle-Vendor: Apache Felix Bundle-ClassPath: commons-lang-2.3.jar, . Bundle-Version: 1.0.0

Re: accessing gogo from a bundle

2011-04-04 Thread Richard S. Hall
After looking at your bundles, you are not creating OSGi R4 bundles, you are creating OSGi R3 bundles. You must include: Bundle-ManifestVersion: 2 Bundle-SymbolicName: foo Technically, this isn't necessary to if you are just creating a bundle that imports other packages normally,

Re: accessing gogo from a bundle

2011-04-04 Thread Donald Whytock
I see...thanks. I really appreciate learning this...it was starting to drive me nuts. Is this one of those good-idea-type things I should do in every bundle from now on? On Mon, Apr 4, 2011 at 11:05 PM, Richard S. Hall he...@ungoverned.org wrote: After looking at your bundles, you are not