Gluon (mobile) and SPI (service provider interface)

33 Views Asked by At

I am experimenting using Gluon (both native and mobile) with GeoTools.

GeoTools loads object factories via the service provider interface (SPI) in Java (specifically by using META-INF/services files).

So far my experiments with using META-INF/services files to load factory classes into a Gluon app (either native or mobile) haven't worked. The object factories fail to load with a message like:

org.geotools.util.factory.FactoryRegistry scanForPlugins
[SUB] WARNING: Can't load a service for category "CRSFactory". Cause is "ServiceConfigurationError: org.geotools.api.referencing.crs.CRSFactory: Provider org.geotools.referencing.factory.ReferencingObjectFactory could not be instantiated".

I am guessing that I can't actually use the META-INF/services files approach with Gluon, as scanning jars for plugins won't be supported in a native/mobile app.

Is that correct? Or is there something I am missing?

thanks

Tried using SPI via META-INF/services files. Was expecting the service provider factories to work. They didn't.

0

There are 0 best solutions below