amodeus-science / amod

Autonomous Vehicles Intelligence Analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geo lab library error: org.opengis.referencing.datum.DatumFactory is not an ImageIO SPI class

arshdefoamed opened this issue · comments

I downloaded the master version of AMOD, performed Maven Install and tried to run ScenarioPreparer.java. The system gives following error:

Exception in thread "main" java.lang.ExceptionInInitializerError
at amod.demo.ext.UserLocationSpecs.(UserLocationSpecs.java:11)
at amod.demo.ext.Static.setup(Static.java:13)
at amod.demo.ScenarioServer.simulate(ScenarioServer.java:65)
at amod.demo.ScenarioServer.main(ScenarioServer.java:57)
Caused by: java.lang.IllegalArgumentException: org.opengis.referencing.datum.DatumFactory is not an ImageIO SPI class
at java.desktop/javax.imageio.spi.ServiceRegistry.checkClassAllowed(ServiceRegistry.java:722)
at java.desktop/javax.imageio.spi.ServiceRegistry.(ServiceRegistry.java:117)
at org.geotools.factory.FactoryRegistry.(FactoryRegistry.java:155)
at org.geotools.factory.FactoryRegistry.(FactoryRegistry.java:146)
at org.geotools.factory.FactoryCreator.(FactoryCreator.java:82)
at org.geotools.referencing.ReferencingFactoryFinder.getServiceRegistry(ReferencingFactoryFinder.java:115)
at org.geotools.referencing.ReferencingFactoryFinder.getFactory(ReferencingFactoryFinder.java:197)
at org.geotools.referencing.ReferencingFactoryFinder.getCRSFactory(ReferencingFactoryFinder.java:288)
at org.geotools.referencing.CRS.parseWKT(CRS.java:535)
at org.matsim.core.utils.geometry.geotools.MGC.getCRS(MGC.java:172)
at org.matsim.core.utils.geometry.transformations.GeotoolsTransformation.(GeotoolsTransformation.java:57)
at amod.demo.ext.UserReferenceFrames.(UserReferenceFrames.java:12)
... 4 more

As per my research, this error is the result of incompatibility of geotools jar file used by matsim and JDK 8.
Can someone suggest what should I do to get rid of this issue?

Hi Arshdeep, this comes from the fact that we use opengis for coordinate transformations. Unfortunately this library is essential for us but hast not been made compatible to JAVA versions higher than java 8. This error happens when you try to use amodeus with a JAVA version higher than 8. My suggestion is to use a a JAVA 8 compiler to avoid the error. We regularly check for updated libraries and try to solve the issue. Please feel free to contact me anytime for additional help. My email is: clruch@idsc.mavt.ethz.ch