Reputation: 1774
I see the following exception when running the code below...
java.lang.IncompatibleClassChangeError: org/opengis/util/InternationalString is not an interface at java.base/java.lang.ClassLoader.defineClassImpl(Native Method) ~[na:na] at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:481) ~[na:na] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:442) ~[na:na]
import org.geotools.data.DataUtilities;
import org.geotools.feature.SchemaException;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.opengis.feature.simple.SimpleFeatureType;
....
SimpleFeatureType schema = null;
String srid = "27700";
try {
schema = DataUtilities.createType(
"",
"Location",
"locations:Point:srid=" + srid + "," + "id:Integer"
);
} catch (SchemaException e) {
// TODO Auto-generated catch block
throw new RuntimeException("FUBAR", e);
}
Why is this interface missing from the repository? And how can I fix this? https://github.com/geotools/geotools/blob/main/modules/library/metadata/src/main/java/org/geotools/util/
I can see that this interface (with the same package) exists within another dependency I use jscience...
Versions:
// https://mvnrepository.com/artifact/org.geotools/gt-referencing implementation group: 'org.geotools', name: 'gt-referencing', version: '25-RC' // https://mvnrepository.com/artifact/org.geotools/gt-main implementation group: 'org.geotools', name: 'gt-main', version: '25-RC' // https://mvnrepository.com/artifact/org.jscience/jscience implementation group: 'org.jscience', name: 'jscience', version: '4.3.1' // https://mvnrepository.com/artifact/org.hibernate/hibernate-spatial (Contains locationtech [email protected]) implementation group: 'org.hibernate', name: 'hibernate-spatial', version: '5.4.30.Final'
Upvotes: 0
Views: 450