Hi Andrea,

I'm sure this is just stating the obvious, but it looks like a
services registry problem. It's trying to find "LengthFunction" which
is sitting there in gt-main (org.geotools.filter.LengthFunction) but
must not be in the
META-INF/services/org.opengis.filter.expression.Function file that
your app is seeing.

I don't do eclipse, as you know, but I'm guessing there is some
incantation missing in your RCP setup.

Michael


On 15 August 2011 17:51, andrea antonello <[email protected]> wrote:
> I am facing a problem when reading a shapefile.
>
> Inside the gt-swt module reading a shapefile with:
>
>            ShapefileDataStore store = new
> ShapefileDataStore(shapeFile.toURI().toURL());
>            SimpleFeatureSource featureSource = store.getFeatureSource();
>
> works as it should, while when using the module as a library from an
> rcp environment, using the same code, I get an error I can't trace
> properly when calling  store.getFeatureSource():
>
> java.lang.AbstractMethodError
>        at 
> org.geotools.filter.function.DefaultFunctionFactory.getFunctionName(DefaultFunctionFactory.java:106)
>        at 
> org.geotools.filter.function.DefaultFunctionFactory.loadFunctions(DefaultFunctionFactory.java:134)
>        at 
> org.geotools.filter.function.DefaultFunctionFactory.functionCache(DefaultFunctionFactory.java:97)
>        at 
> org.geotools.filter.function.DefaultFunctionFactory.getFunctionNames(DefaultFunctionFactory.java:58)
>        at 
> org.geotools.filter.FunctionFinder.lookupFunctions(FunctionFinder.java:181)
>        at 
> org.geotools.filter.FunctionFinder.findFunctionInternal(FunctionFinder.java:154)
>        at 
> org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:128)
>        at 
> org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:111)
>        at 
> org.geotools.filter.FilterFactoryImpl.function(FilterFactoryImpl.java:687)
>        at 
> org.geotools.feature.AttributeTypeBuilder.lengthRestriction(AttributeTypeBuilder.java:625)
>        at 
> org.geotools.feature.AttributeTypeBuilder.buildType(AttributeTypeBuilder.java:456)
>        at 
> org.geotools.feature.AttributeTypeBuilder.buildDescriptor(AttributeTypeBuilder.java:517)
>        at 
> org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:841)
>        at 
> org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:742)
>        at 
> org.geotools.data.AbstractFileDataStore.getFeatureSource(AbstractFileDataStore.java:76)
> ....
>
> Does anyone have an idea about what I am missing?
>
> Cheers,
> Andrea
>
> ------------------------------------------------------------------------------
> uberSVN's rich system and user administration capabilities and model
> configuration take the hassle out of deploying and managing Subversion and
> the tools developers use with it. Learn more about uberSVN and get a free
> download at:  http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to