Hi, I've been using Java 8 and GeoTools 20.2. Now I would like to upgrade both Java and GeoTools. As I understand from Ian Turton GeoTools prefers Java 11 at most. I updated from 8 to 11. What do I have to do to be able to build the application?
I think I will upgrade GeoTools step by step, starting with GeoTools version 21.5. I've read info about 21.5 in https://docs.geotools.org/stable/userguide/welcome/upgrade.html , but I don't understand excactly what I have to do. I changed the version in the pom-file: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <geotools.version>21.5</geotools.version> <!--geotools.version>20.2</geotools.version--> </properties> ... ... <repository> <id>osgeo</id> <name>OSGeo Release Repository</name> <url>https://repo.osgeo.org/repository/release/</url> <snapshots><enabled>false</enabled></snapshots> <releases><enabled>true</enabled></releases> </repository> When the program is built I get the following errors: 1) GeoTools cannot be resolved ClassifiedStyleCreator.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 54 Java Problem Line 54 in the java file: Set<Function> funcs = CommonFactoryFinder.getFunctions(GeoTools.getDefaultHints()); 2) GML cannot be resolved to a type GMLFeatureReader.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 150 Java Problem Line 150 in the Java file: GML gml = new GML(Version.GML3); 3) Hints cannot be resolved to a type MapView.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 830 Java Problem Line 830 in the Java file: Hints hints = new Hints(); 4) MapBoundsEvent cannot be resolved to a type AbstractMapPane.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 855 Java Problem Line 855 in the Java file: public void mapBoundsChanged(MapBoundsEvent event) { 5) MapLayerEvent cannot be resolved to a variable AbstractMapPane.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 821 Java Problem Line 821 in the Java file: public void layerMoved(MapLayerListEvent event) { 6) Parser cannot be resolved to a type ReadKML.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 143 Java Problem Line 143 in the Java file: Parser parser = new Parser(new KMLConfiguration()); 7) PullParser cannot be resolved to a type GMLFeatureReader.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 54 Java Problem Line 54 in the Java file: PullParser parser; 8) SLDParser cannot be resolved to a type LayerPopUpMenu.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 297 Java Problem Line 297 in the Java file: SLDParser parser = new SLDParser(CommonFactoryFinder.getStyleFactory(), sldf); 9) SLDTransformer cannot be resolved to a type JLegendPanel.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 316 Java Problem Line 316 in the Java file: SLDTransformer tx = new SLDTransformer(); 10) The hierarchy of the type JMapPane is inconsistent JMapPane.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 30 Java Problem Line 30 in the Java file: public class JMapPane extends AbstractMapPane { 11) The method addMapBoundsListener(MapBoundsListener) in the type MapContent is not applicable for the arguments (AbstractMapPane) AbstractMapPane.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 523 Java Problem Line 523 in the Java file: mapContent.addMapBoundsListener(this); 12) The method addMapLayerListListener(MapLayerListListener) in the type MapContent is not applicable for the arguments (AbstractMapPane) AbstractMapPane.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 522 Java Problem Line 522 in the Java file: mapContent.addMapLayerListListener(this); 13) Version cannot be resolved to a variable GMLFeatureReader.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 150 Java Problem Line 150 in the Java file: GML gml = new GML(Version.GML3); 14) The import org.geotools.factory.GeoTools cannot be resolved ClassifiedStyleCreator.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 13 Java Problem Line 13 in the Java file: import org.geotools.factory.GeoTools; 15) The import org.geotools.factory.Hints cannot be resolved ImageTiler_org.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/raster line 32 Java Problem Line 32 in the Java file: import org.geotools.factory.Hints; 16) The import org.geotools.GML cannot be resolved GMLFeatureReader.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 21 Java Problem Line 21 in the Java file: import org.geotools.GML; 17) The import org.geotools.map.event cannot be resolved AbstractMapPane.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 31 Java Problem Line 31 in the Java file: import org.geotools.map.event.MapBoundsEvent; 18) The import org.geotools.styling.SLDParser cannot be resolved LayerPopUpMenu.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 40 Java Problem Line 40 in the Java file: import org.geotools.styling.SLDParser; 19) The import org.geotools.styling.SLDTransformer cannot be resolved JLegendPanel.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/mapview line 35 Java Problem Line 35 in the Java file: import org.geotools.styling.SLDTransformer; 20) The import org.geotools.xml.Parser cannot be resolved ReadKML.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 18 Java Problem Line 18 in the Java file: import org.geotools.xml.Parser; 21) The import org.geotools.xml.PullParser cannot be resolved GMLFeatureReader.java /jdbcconnection5/src/main/java/org/geotools/jdbcconnection/data line 30 Java Problem Line 30 in the Java file: import org.geotools.xml.PullParser;
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users