Hi Ludwig, I'm not sure I have fully understood the question. could you please provide some more info on that?
Some questions inline: On Wed, Mar 6, 2019 at 12:03 PM "Ludwig Moser-Spitzenstätter" < luke2...@gmx.at> wrote: > Hello, > 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. > When you say NOW, is it referred to some type of upgrade? did you upgrade GT version? did you upgrade JAVA version? Which java version are you using? Which GeoTools? > > 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 was you doing this? As an instance, ImageIO.write(image, format, file)? Please, let us know. Daniele > 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 > -- Regards, Daniele Romagnoli == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Daniele Romagnoli Senior Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users