I cannot open the S1 file
java.lang.UnsatisfiedLinkError: org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get()I
at org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get(Native Method)
at org.gdal.gdalconst.gdalconstConstants.(gdalconstConstants.java:12)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
at java.lang.reflect.Field.get(Field.java:393)
at org.esa.snap.dataio.gdal.drivers.GDALReflection.fetchGDALLibraryConstant(GDALReflection.java:31)
at org.esa.snap.dataio.gdal.drivers.GDALConst.gaReadonly(GDALConst.java:28)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCountWithGDAL(Sentinel2ProductReader.java:295)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCount(Sentinel2ProductReader.java:321)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.computeMatrixCellsResolutionCount(Sentinel2ProductReader.java:286)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.addBands(Sentinel2OrthoProductReader.java:551)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.readProduct(Sentinel2OrthoProductReader.java:265)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.readProductNodesImpl(Sentinel2ProductReader.java:199)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReaderProxy.readProductNodes(Sentinel2OrthoProductReaderProxy.java:90)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:63)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Could you provide more info about your OS version? Do you have the latest updates installed for SNAP 9?
At the begining i installed snap 10. I had problems reading any file. So, i uninstalled 10 and i installed snap 9. About S1, i can open a file ending in EOD2. I have installed all the available plugins for main download (windows).
The error you receive is for Sentinel-2 products (it is raised by the Sentinel2 product reader). Could you provide an example of products you are trying to open?
Regarding the updates, you can check if the application is up to date by using Help → Check for Updates
To fix the Sentinel-2 error, ensure the application is updated, delete the “gdal” folder in the <user_dir>\.snap\auxdata directory and restart SNAP.
Goodmorning Diana!
The applications is updated. Today i tried to open S2A product and that is the error message: java.lang.NoClassDefFoundError: Could not initialize class org.gdal.gdalconst.gdalconstConstants
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
at java.lang.reflect.Field.get(Field.java:393)
at org.esa.snap.dataio.gdal.drivers.GDALReflection.fetchGDALLibraryConstant(GDALReflection.java:31)
at org.esa.snap.dataio.gdal.drivers.GDALConst.gaReadonly(GDALConst.java:28)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCountWithGDAL(Sentinel2ProductReader.java:295)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCount(Sentinel2ProductReader.java:321)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.computeMatrixCellsResolutionCount(Sentinel2ProductReader.java:286)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.addBands(Sentinel2OrthoProductReader.java:551)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.readProduct(Sentinel2OrthoProductReader.java:265)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.readProductNodesImpl(Sentinel2ProductReader.java:199)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReaderProxy.readProductNodes(Sentinel2OrthoProductReaderProxy.java:90)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:182)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:61)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Have you tried to delete the gdal folder and restart SNAP?
Could you provide me with the size of:
- gdal\gdal-<version> folder
- environment-variables.dll
- NativeLibraryLoader.jar ?
Thank you
I’m sorry, I should have been clearer.
On Windows systems, SNAP created a .snap folder under C:\users\<your_user>\. When the GDAL Reader is called for the first time, an auxdata\gdal is created under .snap:
The image above shows the content of the gdal folder for SNAP 9.
To check if the internal GDAL distribution has been correctly installed on your system, please verify if the size of gdal-3-2-1 and environment-variables.dll is the same with what you see on the attached screenshot.
Note: To avoid compatibility issues between SNAP and GDAL, we recommend using the internal GDAL distribution:
Dear Diana,
I checked what you send me, but still when i load the image file i have this error:
thank you,
Alexandra
Current supported version is SNAP11
Dear mengdahl,
I installed SNAP 11 and i still face the same problem: java.lang.UnsatisfiedLinkError: ‘int org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get()’
at org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get(Native Method)
at org.gdal.gdalconst.gdalconstConstants.(gdalconstConstants.java:12)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:186)
at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1105)
at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1086)
at java.base/java.lang.reflect.Field.get(Field.java:418)
at org.esa.snap.dataio.gdal.drivers.GDALReflection.fetchGDALLibraryConstant(GDALReflection.java:36)
at org.esa.snap.dataio.gdal.drivers.GDALConst.gaReadonly(GDALConst.java:28)
at eu.esa.opt.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCountWithGDAL(Sentinel2ProductReader.java:297)
at eu.esa.opt.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCount(Sentinel2ProductReader.java:325)
at eu.esa.opt.dataio.s2.Sentinel2ProductReader.computeMatrixCellsResolutionCount(Sentinel2ProductReader.java:288)
at eu.esa.opt.dataio.s2.ortho.Sentinel2OrthoProductReader.addBands(Sentinel2OrthoProductReader.java:547)
at eu.esa.opt.dataio.s2.ortho.Sentinel2OrthoProductReader.readProduct(Sentinel2OrthoProductReader.java:266)
at eu.esa.opt.dataio.s2.Sentinel2ProductReader.readProductNodesImpl(Sentinel2ProductReader.java:201)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:175)
at eu.esa.opt.dataio.s2.ortho.Sentinel2OrthoProductReaderProxy.readProductNodes(Sentinel2OrthoProductReaderProxy.java:91)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:181)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:61)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
I am sorry in realtion to the previous message, the problem is for loading Sentinel 2 data only.
Dear Alexandra,
We cannot reproduce the issue with either SNAP 9 or SNAP 11. Could you zip the content of the C:\Users\<yourUser>\gdal folder and send it to me?
Thanks,
Diana
Dear Diana,
I have faced the same problem. When I use SNAP 11, it shows that:
SEVERE: org.esa.snap.dataio.gdal.GDALLoader: Failed to initialize GDAL native drivers. GDAL readers and writers were disabled.java.lang.reflect.InvocationTargetException
Native library load failed.
java.lang.UnsatisfiedLinkError: C:\Users\Administrator.snap\auxdata\gdal\gdal-3-7-2\gdalalljni.dll: no such dictionary or files。
java.lang.UnsatisfiedLinkError: ‘int org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get()’
at org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get(Native Method)
at org.gdal.gdalconst.gdalconstConstants.(gdalconstConstants.java:12)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:186)
at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1105)
at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1086)
at java.base/java.lang.reflect.Field.get(Field.java:418)
at org.esa.snap.dataio.gdal.drivers.GDALReflection.fetchGDALLibraryConstant(GDALReflection.java:36)
at org.esa.snap.dataio.gdal.drivers.GDALConst.gaReadonly(GDALConst.java:28)
at eu.esa.opt.dataio.s2.Sentinel2ProductReader.computeJP2MatrixCellsResolutionCountWithGDAL(Sentinel2ProductReader.java:297).
And my C:\Users<yourUser>\gdal folder is C:\Users\Administrator.snap\auxdata\gdal\gdal-3-7-2
Thanks,
Xuchen
Hello Diana,
Because the file is too big for uploading it here i put it into a cloud in the provided link below:
Thank you,
Alexandra
I may have found the cause of the problem.
The path (C:\Users.….snap\auxdata\gdal) must be in English only!
I created new account in my PC on English and SNAP 11 now opens Sentinel-2 data.
I don’t have permission to download the file. I’ve sent you an access request.
Could you try to replace your gdal folder with this one? https://step.esa.int/downloads/tmp20241113/gdal20241113.zip
Hi Diana, I am working with sentinel 1 images. when I try to open the bands error mesages are coming.
Failed to open image view.
java.lang.RuntimeException: javax.imageio.IIOException: Unsupported compression type (tag number = 50000)!
javax.imageio.IIOException: Unsupported compression type (tag number = 50000)!
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1973)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFRenderedImage.read(TIFFRenderedImage.java:300)
Caused: java.lang.RuntimeException
at it.geosolutions.imageioimpl.plugins.tiff.TIFFRenderedImage.read(TIFFRenderedImage.java:307)
at it.geosolutions.imageioimpl.plugins.tiff.TIFFRenderedImage.getData(TIFFRenderedImage.java:284)
at org.esa.s1tbx.commons.io.ImageIOFile.getData(ImageIOFile.java:297)
at org.esa.s1tbx.commons.io.ImageIOFile.readImageIORasterBand(ImageIOFile.java:248)
at org.esa.s1tbx.io.sentinel1.Sentinel1ProductReader.readBandRasterDataImpl(Sentinel1ProductReader.java:162)
at org.esa.snap.core.dataio.AbstractProductReader.readBandRasterData(AbstractProductReader.java:277)
at org.esa.snap.core.datamodel.Band.readRasterData(Band.java:299)
at org.esa.snap.core.image.BandOpImage.readHigherLevelData(BandOpImage.java:114)
at org.esa.snap.core.image.BandOpImage.computeProductData(BandOpImage.java:72)
at org.esa.snap.core.image.RasterDataNodeOpImage.computeRect(RasterDataNodeOpImage.java:127)
[catch] at javax.media.jai.SourcelessOpImage.computeTile(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at org.esa.snap.core.datamodel.StxFactory.accumulateTile(StxFactory.java:351)
at org.esa.snap.core.datamodel.StxFactory.accumulate(StxFactory.java:335)
at org.esa.snap.core.datamodel.StxFactory.accumulate(StxFactory.java:297)
at org.esa.snap.core.datamodel.StxFactory.create(StxFactory.java:201)
at org.esa.snap.core.datamodel.StxFactory.create(StxFactory.java:275)
at org.esa.snap.core.datamodel.RasterDataNode.computeStxImpl(RasterDataNode.java:2468)
at org.esa.snap.core.datamodel.Band.computeStxImpl(Band.java:493)
at org.esa.snap.core.datamodel.RasterDataNode.getStx(RasterDataNode.java:2435)
at org.esa.snap.core.datamodel.RasterDataNode.createDefaultImageInfo(RasterDataNode.java:1839)
at org.esa.snap.core.datamodel.Band.createDefaultImageInfo(Band.java:472)
at org.esa.snap.core.datamodel.RasterDataNode.getImageInfo(RasterDataNode.java:1821)
at org.esa.snap.core.datamodel.RasterDataNode.getImageInfo(RasterDataNode.java:1804)
at org.esa.snap.core.image.ImageManager.prepareImageInfos(ImageManager.java:834)
at org.esa.snap.core.image.ColoredBandImageMultiLevelSource.create(ColoredBandImageMultiLevelSource.java:51)
at org.esa.snap.core.image.ColoredBandImageMultiLevelSource.create(ColoredBandImageMultiLevelSource.java:47)
at org.esa.snap.core.image.ColoredBandImageMultiLevelSource.create(ColoredBandImageMultiLevelSource.java:41)
at org.esa.snap.ui.product.ProductSceneImage.(ProductSceneImage.java:72)
at org.esa.snap.rcp.actions.window.OpenImageViewAction.createProductSceneImage(OpenImageViewAction.java:274)
at org.esa.snap.rcp.actions.window.OpenImageViewAction.access$100(OpenImageViewAction.java:67)
at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.doInBackground(OpenImageViewAction.java:241)
at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.doInBackground(OpenImageViewAction.java:220)
at com.bc.ceres.swing.progress.ProgressMonitorSwingWorker.doInBackground(ProgressMonitorSwingWorker.java:56)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused: java.util.concurrent.ExecutionException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at javax.swing.SwingWorker.get(SwingWorker.java:602)
[catch] at org.esa.snap.rcp.actions.window.OpenImageViewAction$1.done(OpenImageViewAction.java:228)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Dear @sajeenthira,
What is your SNAP version?