I used geotools to Implement a GIS component for one of my applications. But now i noticed a wird behaviour of ImageIO - which has a (VM) GLOBAL registry.
Note: Image loading is working fine in the application that uses geotools. But ever since i use geotools IT OS no more possible to use ImageIO to write Images to file.
How can i restore the default state, where none of those Readers is registered?
When i try to call deregisterAll on the registry an exception appears.
How can i fix this?
Here my exception log:
Mär 06, 2019 11:50:18 AM it.geosolutions.imageio.gdalframework.GDALUtilities loadGDAL
WARNUNG: Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won't be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path
Mär 06, 2019 11:50:18 AM it.geosolutions.util.KakaduUtilities loadKakadu
WARNUNG: Failed to load the Kakadu native libs. This is not a problem unless you need to use the Kakadu plugin: it won't be enabled. java.lang.UnsatisfiedLinkError: no kdu_jni in java.library.path
Error while parsing JAI registry file "file:/D:/WS18/git/lumo.core.runtime/libs/geotools-17.1-cleaned/imageio-ext-imagereadmt-1.1M012010.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #29
A descriptor is already registered against the name "ImageReadMT" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/jt-zonalstats-1.5.0.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #4
A descriptor is already registered against the name "ZonalStats" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/gt-coverage-20.2.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #31
A descriptor is already registered against the name "org.geotools.ColorReduction" under registry mode "rendered"
Error in registry file at line number #32
A descriptor is already registered against the name "org.geotools.ColorInversion" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/jt-vectorbinarize-1.5.0.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #4
A descriptor is already registered against the name "VectorBinarize" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/imageio-ext-imagereadmt-1.1.28.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #29
A descriptor is already registered against the name "ImageReadMT" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/jt-rangelookup-1.5.0.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #4
A descriptor is already registered against the name "RangeLookup" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/jt-contour-1.5.0.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #4
A descriptor is already registered against the name "Contour" under registry mode "rendered"
Error while parsing JAI registry file "file:/D:/WS18/TestLab/libs/geotools20-2/jt-vectorize-1.5.0.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #4
A descriptor is already registered against the name "Vectorize" under registry mode "rendered"
SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider org.geotools.imageio.netcdf.NetCDFImageReaderSpi could not be instantiated
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at javax.imageio.ImageIO.<clinit>(Unknown Source)
at HelloThumbnail.clearIORegistry(HelloThumbnail.java:42)
at HelloThumbnail.main(HelloThumbnail.java:36)
... 11 more
Caused by: java.lang.ExceptionInInitializerError
at org.apache.log4j.LogManager.getLogger(LogManager.java:42)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at ucar.nc2.NetcdfFile.<clinit>(NetcdfFile.java:95)
at org.geotools.imageio.netcdf.utilities.NetCDFUtilities.<clinit>(NetCDFUtilities.java:280)
at org.geotools.imageio.netcdf.NetCDFImageReaderSpi.<clinit>(NetCDFImageReaderSpi.java:122)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 20 more
Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
at org.apache.log4j.Log4jLoggerFactory.<clinit>(Log4jLoggerFactory.java:49)
... 32 more
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users