andrea antonello ha scritto:
> Hi developers,
> a strange problem popped up lately when I try to do a:
> 
>         SimpleFeatureType type = featureCollection.getSchema();
>         ShapefileDataStore newDataStore = (ShapefileDataStore) 
> dataStoreFactory
>                 .createNewDataStore(params);
>         newDataStore.createSchema(type);
> 
> java.lang.NoSuchMethodError:
> org.geotools.feature.FeatureTypes.getFieldLength(Lorg/opengis/feature/type/AttributeDescriptor;)I
>       at 
> org.geotools.data.shapefile.ShapefileDataStore.createDbaseHeader(ShapefileDataStore.java:1036)
>       at 
> org.geotools.data.shapefile.ShapefileDataStore.createSchema(ShapefileDataStore.java:855)
>       at 
> eu.hydrologis.jgrass.jgrassgears.io.shapefile.ShapefileFeatureWriter.writeFeatureCollection(ShapefileFeatureWriter.java:84)
>       at 
> eu.hydrologis.jgrass.jgrassgears.modules.io.TestShapefileIO.testShapefileIO(TestShapefileIO.java:57)
> ....

I think you are mixing up different versions of the jars, in particular
a older shapefile datastore witha newer gt-main module.

That method was recently expanded to take a superclass of 
AttributeDescriptor as a parameter. Compile wise it's backwards
compatible but I guess it does not work if you're mixing jars
that are compiled for different versions

Cheers
Andrea



-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to