Snappy errors

Trying to use snappy with the current building on a ubuntu machine, I received the following error messages. Maybe you should have a look on it!

~/.snap/snap-python/snappy/tests$ python test_snappy_product.py
java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at ncsa.hdf.hdf5lib.H5.loadH5Lib(H5.java:339)
at ncsa.hdf.hdf5lib.H5.(H5.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.esa.s3tbx.dataio.probav.ProbaVSynthesisProductReaderPlugIn.loadClassWithNativeDependencies(ProbaVSynthesisProductReaderPlugIn.java:140)
at org.esa.s3tbx.dataio.probav.ProbaVSynthesisProductReaderPlugIn.loadHdf5Lib(ProbaVSynthesisProductReaderPlugIn.java:130)
at org.esa.s3tbx.dataio.probav.ProbaVSynthesisProductReaderPlugIn.(ProbaVSynthesisProductReaderPlugIn.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.esa.snap.SnapCoreActivator.loadServices(SnapCoreActivator.java:60)
at org.esa.snap.core.dataio.ProductIOPlugInManager.(ProductIOPlugInManager.java:194)
at org.esa.snap.core.dataio.ProductIOPlugInManager$Holder.(ProductIOPlugInManager.java:201)
at org.esa.snap.core.dataio.ProductIOPlugInManager.getInstance(ProductIOPlugInManager.java:45)
at org.esa.snap.core.dataio.ProductIO.getProductReaderForInput(ProductIO.java:252)
at org.esa.snap.core.dataio.ProductIO.readProductImpl(ProductIO.java:211)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:183)
WARNING: org.esa.s3tbx.dataio.probav.ProbaVSynthesisProductReaderPlugIn: class org.esa.s3tbx.dataio.probav.ProbaVSynthesisProductReaderPlugIn: HDF-5 library not available: class java.lang.UnsatisfiedLinkError: ncsa.hdf.hdf5lib.H5.H5dont_atexit()I
WARNING: org.esa.snap.dataio.hdf5.Hdf5ProductWriterPlugIn: class org.esa.snap.dataio.hdf5.Hdf5ProductWriterPlugIn: HDF-5 library not available: class java.lang.NoClassDefFoundError: Could not initialize class ncsa.hdf.hdf5lib.H5
F.FEE.E

ERROR: test_readPixels_with_java_array (main.TestBeamIO)

Traceback (most recent call last):
File “test_snappy_product.py”, line 56, in test_readPixels_with_java_array
b.readPixels(0, 0, w, 1, a)
AttributeError: ‘NoneType’ object has no attribute ‘readPixels’

======================================================================
ERROR: test_readPixels_with_numpy_array (main.TestBeamIO)

Traceback (most recent call last):
File “test_snappy_product.py”, line 80, in test_readPixels_with_numpy_array
b.readPixels(0, 0, w, 1, a)
AttributeError: ‘NoneType’ object has no attribute ‘readPixels’

======================================================================
ERROR: test_readValidMask_with_numpy_array (main.TestBeamIO)

Traceback (most recent call last):
File “test_snappy_product.py”, line 91, in test_readValidMask_with_numpy_array
b.readValidMask(0, 0, w, 1, a)
AttributeError: ‘NoneType’ object has no attribute ‘readValidMask’

======================================================================
FAIL: test_getBandNames (main.TestBeamIO)

Traceback (most recent call last):
File “test_snappy_product.py”, line 37, in test_getBandNames
self.assertEqual(len(names), 17)
AssertionError: 1 != 17

======================================================================
FAIL: test_getSceneRasterWidthAndHeight (main.TestBeamIO)

Traceback (most recent call last):
File “test_snappy_product.py”, line 47, in test_getSceneRasterWidthAndHeight
self.assertEqual(w, 1121)
AssertionError: 3820L != 1121


Ran 7 tests in 1.854s

FAILED (failures=2, errors=3)

Hi,

libjhdf5-jni and libjhdf5-java is installed on system and sources compile from trunk.
Any hits to use python binding from scratch?

Regards,
Patrick

Hi Patrick,
I had the same problem with Debian. The solution:
– Check that packages libjhdf5-jni and libjhdf5-java are installed (which you already did)
– Create a symbolic link into the JRE used by STEP:

cd /opt/snap/jre/lib/amd64

ln -s /usr/lib/jni/libjhdf5.so .

Enjoy !
Nicolas

1 Like