Hi Moda:

GeoTools uses the Java "Factory SPI" system to find the different factories on the classpath. OSGi mangles classpaths so that the contents are only "published" by package; and what is being used by FactorySPI to wire things up is the META_INF/services directory.

The only solution we found for uDig was to place all the geotools jars into a single OSGi bundle. A member of our community repackaged GeoTools with the correct OSGi manifests to wire things up but did not have a mandate to help push that back into the core library.

You will find these topics covered in our user guide:
- http://docs.codehaus.org/display/GEOTDOC/03+GeoTools+and+Eclipse+or+OSGi

And the proposal to fix the manifests in geotools:
- 
http://docs.codehaus.org/display/GEOTOOLS/Add+bundle+information+to+jar+manifest

If you would like to arrange a patch for the above we would be glad to review; right now it is too big a job to tackle without interested users testing and/or paying for the work to be done :-(

Jody

On 05/09/2009, at 7:03 AM, Moda, Frank wrote:

Hello,

I am currently using Geotools in a project that is to be deployed into Apache Servicemix as an OSGI bundle. As part of the program, it creates a ReferencingFactoryFinder to get a MathTransformFactory. This Factory uses the Lambert_Azimuth_Equal_Area Projection to perform transform operations.

When running from the command line (using commands like “mvn jetty:run” or “mvn camel:run”), the program executes correctly. It is able to discover about 25 different Projections, one of which is the Lambert_Azimuth_Equal_Area Projection that I am using. I believe it is able to find these by looking in the gt-referencing package, under the META-INF/services directory, where it specifies an implementation of MathTransformFactory and providers for MathTransformProvider.

However, when I turn the project into an OSGI bundle, and place it in servicemix, it finds no projections, and fails on FactoryException: org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Lambert_Azimuthal_Equal_Area". My belief is that is not seeing the META-INF/services directory that is included within a geotools osgi bundle I created as a combination of gt-referencing and gt-metadata. I was wondering if anyone has been able to successfully use this referencing technique within servicemix, and if so, how do I set up the geotools in servicemix for it to be seen correctly? For reference, I am using version 2.5.3 of geotools.

Thanks in advance,

Frank
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  
http://p.sf.net/sfu/bobj-july_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to