-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I 'm trying to use GT 2.3, in order to create a map viewer (Shapefile,
Geotiff, etc ...). Displaying Shapefiles work perfectly, but when i m
trying to add a Geotiff layer based on GridCoverage2D in my
MapContext, I've got this :
private GridCoverage2D _loadFromTifFile(String filepath)
{
File tif = new File(filepath);
GeoTiffReader reader = (GeoTiffReader) ((new
GeoTiffFormat()).getReader(tif));
try {
return (GridCoverage2D) reader.read(null);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
Caused by: java.lang.ExceptionInInitializerError
at org.geotools.gce.geotiff.GeoTiffReader.read(GeoTiffReader.java:458)
at fr.medes.geomap.MapViewer._loadFromTifFile(MapViewer.java:448)
at fr.medes.geomap.MapViewer.doAddLayer(MapViewer.java:406)
... 28 more
Caused by: java.lang.ClassCastException:
com.sun.media.jai.imageioimpl.ImageReadWriteSpi
at
javax.media.jai.OperationRegistry.registerServices(OperationRegistry.java:2047)
at
javax.media.jai.ThreadSafeOperationRegistry.registerServices(ThreadSafeOperationRegistry.java:612)
at
javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:365)
at javax.media.jai.JAI.<clinit>(JAI.java:560)
... 31 more
I tryied to load a real GeoTiff file ,and a Tif+tfw file, it's not the
same class but the same error. So i decided to open the
GeoTiffReader.java, and try to find the reason of this error.
It seems to be all the JAI.X static methods, that raise this exception
but why and of course how to solve that ?
Thanks for all.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE6sYbi+lV9TINsfgRAnxeAJ9R60XQKH7i8p676MD2OxnTxKzHRwCgsOmI
7PvCIsm2OM1P+jeczcsuA3I=
=Fisk
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users