4

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.

Gent
  • 83
  • 1
  • 6

1 Answers1

8

Please check the readme.html file. I checked version 20.2 and it says:

Warning: Java 9 is not yet supported

mate00
  • 2,727
  • 5
  • 26
  • 34
  • 1
    You're right. Also check [this](https://osgeo-org.atlassian.net/browse/GEOT-6287?focusedCommentId=80316&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-80316) – Gent Apr 29 '19 at 09:37
  • Right, they're working on this. I downloaded Geotools in order to try to help you and started reading that readme file. :) – mate00 Apr 29 '19 at 09:39
  • try 21.x and it should work with 9 though we have only tested with 11. – Ian Turton Apr 29 '19 at 10:15
  • I can't find all needed geotools packages of same version in one place. They're spread across many repositories ... some of them not working. Is there any repository I can find all libs of same version together? – Magno C Dec 10 '21 at 16:44