Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Extension Registry outside Equinox?

2009/3/10 Michael Greifeneder <mikegr@xxxxxxx>
Hello,

I try to find out if the Extension Registry (org.eclipse.equinox.registry) can
be used outside Equinox? I like the concept and I would like to use it with a
Swing application. However I have to convince my project partners that we are
not forced to stick with Equinox, although I don't think we are going to use
any other OSGI implementation.

I created a simply test case with Apache Felix and installed
org.eclipse.equinox.common_3.5.0.v20090119-1830.jar
org.eclipse.equinox.registry_3.4.100.v20081024-1200.jar
org.eclipse.equinox.supplement_1.2.0.v20090127-1630.jar
org.eclipse.equinox.util_1.0.1.v20081205-1800.jar
from 3.5M5

I get this message during start of the registry:

Error:  Could not parse XML contribution for
"org.eclipse.equinox.registry;singleton:=true//plugin.xml". Any contributed
extensions and extension points will be ignored.

Hi Michael,

yes it is possible, but you need to install the SAXParserFactory as a service
before starting the registry bundle - I don't know if there's a small bundle in
Equinox that will do this for you, but otherwise you could write one yourself.

you just need to do the following in the start method:

    bundleContext.registerService(
        javax.xml.parsers.SAXParserFactory.class.getName(),
          javax.xml.parsers.SAXParserFactory.newInstance(), null);

once this is in place you should be able to use the registry as normal.

HTH

I tried the same configuration with bundles from release 3.4.2.
There I got a NullPointerException:
Caused by: java.lang.NullPointerException
org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:63)
org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(EclipseBundleListener.java:172)
org.eclipse.core.internal.registry.osgi.EclipseBundleListener.processBundles(EclipseBundleListener.java:90)
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.onStart(RegistryStrategyOSGI.java:210)
..

My questions:
Is it possible?
Anyone tried and has a successful configuration?
Which bundles are required?
Should I provide more information for my use case?

Thanks for your help,
Regards,

Mike
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

--
Cheers, Stuart

Back to the top