We are migrating our project to java 9 and I am getting this exception while using geotools:
java.lang.IllegalArgumentException: org.opengis.referencing.datum.DatumFactory is not an ImageIO SPI class
at java.desktop/javax.imageio.spi.ServiceRegistry.checkClassAllowed(ServiceRegistry.java:745)
at java.desktop/javax.imageio.spi.ServiceRegistry.<init>(ServiceRegistry.java:140)
at org.geotools.factory.FactoryRegistry.<init>(FactoryRegistry.java:155)
at org.geotools.factory.FactoryRegistry.<init>(FactoryRegistry.java:146)
at org.geotools.factory.FactoryCreator.<init>(FactoryCreator.java:82)
My java version:
openjdk 9
OpenJDK Runtime Environment (build 9+181)
OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
I know there are some changes to support java 9 in GeoTools 19.0, but upgrading geotools to version 19.0 (and 20.x too!) doesn't solve this problem.
Please check the readme.html
file. I checked version 20.2 and it says:
Warning: Java 9 is not yet supported