[Geoserver-devel] Failed to introduce custom GetMapProducer via GetMapProducerFactorySpi

I've implemented a custom GetMapProducer and packaged it's class files
together with the
META-INF\services\org.vfny.geoserver.wms.GetMapProducerFactorySpi
to a jar file.

Unfortunately the custom GetMapProducer is not found and when I try it out I
get
an exception, i.e.

org.vfny.geoserver.wms.WmsException: There is no support for creating maps
in application/clickable format
  at
org.vfny.geoserver.wms.responses.GetMapResponse.getDelegate(GetMapResponse.java:543)

What is missing?

I noticed that in difference to the WFS extension point
org.vfny.geoserver.wfs.FeatureResponseDelegateProducerSpi the
org.geotools.factory.FactoryFinder
is *NOT* used for WMS. Rather a list of producers is obtained from the
application context, i.e.
org.vfny.geoserver.wms.responses.GetMapResponse#getDelegate(String,WMS).
Obviously the custom GetMapProducer is not contained in that context.

Bob
--
View this message in context: http://www.nabble.com/Failed-to-introduce-custom-GetMapProducer-via-GetMapProducerFactorySpi-tf4348668.html#a12390032
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

meinc ha scritto:

I've implemented a custom GetMapProducer and packaged it's class files
together with the
META-INF\services\org.vfny.geoserver.wms.GetMapProducerFactorySpi
to a jar file.

Unfortunately the custom GetMapProducer is not found and when I try it out I
get
an exception, i.e.

org.vfny.geoserver.wms.WmsException: There is no support for creating maps
in application/clickable format
  at
org.vfny.geoserver.wms.responses.GetMapResponse.getDelegate(GetMapResponse.java:543)

What is missing?

I noticed that in difference to the WFS extension point
org.vfny.geoserver.wfs.FeatureResponseDelegateProducerSpi the
org.geotools.factory.FactoryFinder
is *NOT* used for WMS. Rather a list of producers is obtained from the
application context, i.e.
org.vfny.geoserver.wms.responses.GetMapResponse#getDelegate(String,WMS).
Obviously the custom GetMapProducer is not contained in that context.

You have to register your map producer in the applicationContext.xml file in the same module as your output format resides. See how the other
output formats are registered, and do the same.

We switched whatever we could to Spring instead of SPI because of increased flexibility, there are still some leftovers here and there
thought.

Cheers
Andrea

Just for completeness, module is equivalent with jar here.
I've added an applicationContext.xml to the jar's root dir and now my custom
GetMapProducer is considered.

Thanks
~Bob
--
View this message in context: http://www.nabble.com/Failed-to-introduce-custom-GetMapProducer-via-GetMapProducerFactorySpi-tf4348668.html#a12390701
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

meinc ha scritto:

Just for completeness, module is equivalent with jar here.
I've added an applicationContext.xml to the jar's root dir and now my custom
GetMapProducer is considered.

Nice. And how is it going? Is the speedup you were looking for there?
Cheers
Andrea