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 EscottFriend
Messages: 61
Registered: July 2009

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;
Provide-Capability: osgi.serviceloader;

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
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 WatsonFriend
Messages: 473
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 ( Did you install and start the bundles from SPI Fly?

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

Current Time: Sun Oct 23 20:34:07 GMT 2016

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

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