I have an application that references a JAR file. In that JAR file, I have a method that creates a Coordinate Reference System using the CRS class. This class is Project_Point. When I run and test this class, everything works fine. But when I bring it into another application, I get errors with the CRS class.
sourceWKT = sourceWKTArg; targetWKT = targetWKTArg; //crashes here with error Exception in thread "main" java.lang.NoSuchMethodError: org.geotools.referencing.CRS.getAuthorityFactory(Z)Lorg/opengis/referencing/crs/CRSAuthorityFactory; CRSAuthorityFactory factory = CRS.getAuthorityFactory(true); //crashes here with errors about EPSG code not found sourceCRS = CRS.parseWKT(sourceWKT); sourceCRS = CRS.decode("EPSG:4326");
Again, when I run this code from the class, everything is fine.
Could this be happening because the application I'm trying to use this class in is version 2.2 of geotools and this class is written in 2.7? If so, whats a work around for this?