Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » ServiceLoader and OSGi(Lucene 4.2 uses java.util.ServiceLoader and cannot find its services)
ServiceLoader and OSGi [message #1039302] Fri, 12 April 2013 02:14 Go to next message
Eban Escott is currently offline Eban Escott
Messages: 61
Registered: July 2009
Member
Hi,

I am trying to use Lucene 4.2 as an OSGi bundle. Lucene uses ServiceLoaders and I can't get them to work with Equinox.

I have followed the blog on the OSGi Alliance that states to add the following to the manifest:

Require-Capability: osgi.extender;
    filter:="(osgi.extender=osgi.serviceloader.registrar)"
Provide-Capability: osgi.serviceloader;
    osgi.serviceloader=foo.bar.MySPI


I get the following stack trace when starting the Lucene bundle:

org.osgi.framework.BundleException: The bundle "org.apache.lucene_4.2.0 [11]" could not be resolved. Reason: Missing Constraint: Require-Capability: osgi.extender; filter="(osgi.extender=osgi.serviceloader.registrar)"


I am using Equinox 3.8.2. Has anyone tried anything similar with getting Equinox to play nicely with ServiceLoader?

Thanks in advance
Eban
Re: ServiceLoader and OSGi [message #1039672 is a reply to message #1039302] Fri, 12 April 2013 12:38 Go to previous message
Thomas Watson is currently offline Thomas Watson
Messages: 436
Registered: July 2009
Senior Member
That indicates to me that you do not have an osgi.servlvice.loader.registrar capability provider installed. So far I only know of one implementation of this capability in the Apache Aries project called SPI Fly (http://aries.apache.org/modules/spi-fly.html). Did you install and start the bundles from SPI Fly?

Tom.
Previous Topic:Equinox console error
Next Topic:Using P2 to install and uninstall OEPE
Goto Forum:
  


Current Time: Sat Oct 25 16:16:02 GMT 2014

Powered by FUDForum. Page generated in 0.07790 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software