Equinox System bundle not exporting package?

Up vote 0 down vote favorite share g+ share fb share tw.

I am trying to embed Equinox into our current server side application. Managed to start the osgi framework programatically.(via Spring) The system bundle gets installed and started implicitly(I think). However I noticed non of the system packages are exported!

Osgi> ss Framework is launched. Id State Bundle 0 STARTING org.eclipse. Osgi_3.7.1.

R37x_v20110808-1106 osgi> packages 0 No exported packages As a result all plugins I try to start fails as they all Import package org.osgi.framework. Anyone come across this? Am I missing some config?

Thanks a lot! Climbing the Steep learning curve for OSGI My Code: private void bootstrapOsgiFmk() { logger. Info("Starting OSGI framework"); FrameworkFactory frameworkFactory = ServiceLoader.

Load(FrameworkFactory. Class).iterator().next(); Map config = new HashMap(); config. Put("osgi.

Console", "1234"); config. Put(Constants. FRAMEWORK_STORAGE, "osgilogs/"); config.

Put(Constants. FRAMEWORK_STORAGE_CLEAN, "true"); config. Put(Constants.

FRAMEWORK_SYSTEMPACKAGES_EXTRA,"com.other. Pkg"); Framework framework = frameworkFactory. NewFramework(config); try { framework.start(); } catch (BundleException e) { logger.

Error("Fail to start osgi framework. ", e); } logger. Info("OSGI started"); context.

RegisterService(IQuoteService.class.getName(), new SimpleQuote(),null); } osgi equinox link|improve this question edited Jan 16 at 9:30 asked Jan 13 at 17:46Slash163.

Have you done something with the value of the org.osgi.framework.system. Packages property? – Neil Bartlett Jan 13 at 18:32 I have included my code which is called as part of a spring bean init.

I might have played with the config previously while trying to experiment. Have an impression that fmk is stateful and restore at each restart. I usually just delete the osgilogs dir.

Many thanks again for helping! – Slash Jan 16 at 9:37 I can't see anything wrong with this code. It might be worth reporting a bug against Equinox, or you could try using Felix and checking the results there.

BTW you're correct that the framework is stateful: you can even programmatically delete the storage directory if you don't want this property. – Neil Bartlett Jan 16 at 17:19 Incidentally if you do try with Felix, you will have to find an alternative for the console since Felix does not have a built-in console. You could install the Felix shell bundles for this.

– Neil Bartlett Jan 16 at 17:20 thanks Neil appreciated. Reached a dead end here might give felix a try. Some thoughts that I had.

Possible spring classLoader conflicting with the osgi classloader?. No idea – Slash Jan 16 at 17:29.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions