I am attempting to use GeoTools to transforme
CoordinateReferenceSystem, but when i try to create a source CRS,
the program fails when calling the CRS.decode. It' a classloader
issue, because when i launch the application in
debug mode, the decode method is not found.
I include this GeoTools libs on my plug-in:
geoapi-2.0-tiger.jar
gt2-api-2.3.0.jar
gt2-main-2.3.0.jar
gt2-referencing-2.3.0.jar
gt2-epsg-wkt-2.3.0.jar
CoordinateReferenceSystem sourceCRS =
org.geotools.referencing.CRS.decode("EPSG:"
+ epsgCode);
...
MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);
java.lang.IllegalAccessError: tried to access method
org.opengis.util.CodeList.<init>(Ljava/lang/String;Ljava/util/Collection;)V
from class org.opengis.metadata.citation.Role
at org.opengis.metadata.citation.Role.<init>(Role.java:114)
at org.opengis.metadata.citation.Role.<clinit>(Role.java:50)
at org.geotools.metadata.iso.citation.ResponsiblePartyImpl.<clinit>(
ResponsiblePartyImpl.java:139)
at org.geotools.metadata.iso.citation.Citations.<clinit>(Citations.java
:99)
at org.geotools.referencing.factory.wms.AutoCRSFactory.<clinit>(
AutoCRSFactory.java:62)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at sun.misc.Service$LazyIterator.next(Service.java:271)
at org.geotools.factory.FactoryRegistry.scanForPlugins(
FactoryRegistry.java:564)
at org.geotools.factory.FactoryRegistry.safeScanForPlugins(
FactoryRegistry.java:540)
at org.geotools.factory.FactoryRegistry.getServiceProviders(
FactoryRegistry.java:175)
at org.geotools.referencing.FactoryFinder.getFactories(
FactoryFinder.java:195)
at org.geotools.referencing.FactoryFinder.getCRSAuthorityFactories(
FactoryFinder.java:520)
at org.geotools.referencing.DefaultAuthorityFactory.<init>(
DefaultAuthorityFactory.java:58)
at org.geotools.referencing.DefaultAuthorityFactory.<init>(
DefaultAuthorityFactory.java:50)
at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:377)
at org.geotools.referencing.CRS.decode(CRS.java:330)
at org.geotools.referencing.CRS.decode(CRS.java:266)
at fr.myplugin.common.gis.GISUtil.projectToWgs84(GISUtil.java:171)
I was wondering whether anyone had a solution for this problem.
Thanks in advance for your help.
Cyrille
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users