Hi list,

I'm new to java/new to geo-tools and I'm trying in vain to read/write
shapefiles with geotools.

I've downloaded geotools 2.6.5 and added jars as libraries.

Samples codes from geotools website
(http://docs.codehaus.org/display/GEOTDOC/Shapefile+Plugin) are not
compatible with the version of geotools I use it seems....


And when I try the Eclipse user sample from
http://docs.codehaus.org/display/GEOTDOC/Welcome+to+Eclipse+Developers

I get another message, i'm not able to understand (see below).
By the way, playing around with the Shapefile class from
http://code.google.com/p/dimitrisk-gis/ display the same error message.



Welcome to GeoTools:2.6.5
You chose to open this file: buildings.shp
Reading content buildings
1 févr. 2011 13:00:26 org.geotools.factory.FactoryRegistry scanForPlugins
ATTENTION: Échec lors de l'initialisation d'un service de catégorie
"MathTransformProvider". La cause est "ServiceConfigurationError:
org.geotools.referencing.operation.MathTransformProvider: Provider (...)
Provider could not be instantiated: java.lang.NoClassDefFoundError:
javax/media/jai/WarpAffine".
java.util.ServiceConfigurationError:
org.geotools.referencing.operation.MathTransformProvider: Provider
org.geotools.referencing.operation.transform.WarpTransform2D$Provider could
not be instantiated: java.lang.NoClassDefFoundError:
javax/media/jai/WarpAffine
        at java.util.ServiceLoader.fail(ServiceLoader.java:224)
        at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:370)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:438)
        at 
org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:829)
        at
org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:773)
        at
org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:808)
        at
org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:195)
        at
org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:280)
        at
org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:314)
        at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:593)
        at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:897)
        at
org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:222)
        at
org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:201)
        at
org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:1088)
        at
org.geotools.data.shapefile.prj.PrjFileReader.<init>(PrjFileReader.java:78)
        at
org.geotools.data.shapefile.ShapefileDataStore.openPrjReader(ShapefileDataStore.java:532)
        at
org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:686)
        at
org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:638)
        at
org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:632)
        at
org.geotools.data.shapefile.ShapefileDataStore.getFeatureSource(ShapefileDataStore.java:964)
        at com.simogeotools.FirstProject.main(FirstProject.java:69)
Caused by: java.lang.NoClassDefFoundError: javax/media/jai/WarpAffine
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:362)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: javax.media.jai.WarpAffine
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        ... 22 more

Any help would be very welcome regarding this message error and the way to
handle shapefiles with geotools 2.6.5.

thanks, simo

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Shapefiles-manipulation-working-samples-tp5980664p5980664.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to