Hi Bertrand,
Indeed successful Equinox+SCR configurations are what I first went
looking for and will keep looking, and also the Equinox mailing list.
However, we have started work on refactoring the KReS components so that
they can still launch when SCR is missing (see issue STANBOL-10). We'll
keep you posted on that.
Thanks,
Alessandro
On 12/21/10 9:51 AM, Bertrand Delacretaz wrote:
Hi,
On Mon, Dec 20, 2010 at 6:13 PM, Alessandro Adamou<[email protected]> wrote:
Some progress:
Did you install the required SCR runtime bundles? You need at least
the org.apache.felix.scr (or Equinox equivalent) bundle
I thought org.eclipse.equinox.dr (Declarative Services) could be the one,
but adding it resulted in no effect...
I don't know enough about Equinox to be more specific, but I would
recommend looking for an Equinox example that use SCR and works, this
would help find out exactly what you need.
So I added these bundles to the platform (as per the lite launcher
list.xml):
- org.apache.felix:org.osgi.core:1.2.0
that's the OSGi framework itself, you should not add it IMO. Having to
add it might mean that the Felix SCR components depend on a more
recent version of the framework than Equinox is providing, but you'll
end up with a mess if you add it.
- org.apache.felix:org.apache.felix.scr:1.4.0
- org.apache.felix:org.apache.felix.configadmin:1.2.4
- org.apache.felix:org.apache.felix.metatype:1.0.4
- org.osgi:org.osgi.compendium:4.1.0
and their dependencies (resolved automatically by Eclipse)....
This time a few components did start, but only the ones that did not have a
configuration (i.e. no variables annotated with @Property). The others won't
start.
The first time I tried it out I was getting, for every component with a
configuration, a ClassCastException:
"org.apache.felix.cm.impl.ConfigurationAdminImpl cannot be cast to
org.osgi.service.cm.ConfigurationAdmin" was thrown....
Confirms that you've then got several versions of the platform
interfaces in your system, not good.
Then I remade an OSGi config from scratch and the exception was gone. Still,
no components with properties were activated.
I thought org.apache.felix.configadmin was the bundle that would provide
this feature, but maybe I'm wrong?...
I think you really need to come up first with an Equinox setup that
runs the simplest SCR component that you can find, and then try
running the stanbol SCR components on that.
-Bertrand