hzl
March 27, 2018, 2:34pm
#1
Hi,
With snappy on CentOS-6.8, I meet the following strange error
WARNING: org.esa.snap.core.dataop.dem.ElevationFile: http error:http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/srtm_27_03.zip on http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/srtm_27_03.zip
Java heap space
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException
Traceback (most recent call last):
File “./pre-processing_RS2.py”, line 146, in
boxcar7(product_tc_db, output_spk) #product_3
File “./pre-processing_RS2.py”, line 141, in boxcar7
product_tc_db_spk = ProductIO.writeProduct(target, output_file3, ‘ENVI’)
RuntimeError: java.lang.NullPointerException
====== end of error message =======
is it caused by the missing file http error:http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/srtm_27_03.zip ?
If yes, why another installation of other computer with the same snap-version /python-code works correctly ?
thanks,
HuiZhong
1 Like
Java heap space is an error message concerning the amount of storage that is available to Java Virtual Machine. I have had that a lot and am also looking for a redemption. >> SNAP developers???
Have you tried to modify the snappy.ini file to increase the java memory?
You can modify the snappy.ini file by script. Change the line # java_max_mem: 4G to e.g. java_max_mem: 6G
The value could be computed by the (Python) script based on the memory available.
There is also the snap-conf-optimiser. Which can be used to find a suitable configuration. But this is not really applicable in your case, because it doesn't change the configuration of snappy/jpy.
hzl
March 27, 2018, 3:45pm
#4
Thanks very much for the suggestion !
Where (sub-directory) is the file snappy.ini ?
HuiZhong
I should be in your snappy folder, by default it is in [HomePath]/.snap/snap-python/snappy
hzl
March 27, 2018, 4:26pm
#6
The file is not there as shown here:
ip07-mp2:/home/hlu/.snap> pwd
/home/hlu/.snap
ip07-mp2:/home/hlu/.snap> ls -a
. … auxdata epsg-database etc graphs snap-jython snap-python system
thanks !
HuiZhong
You should find a folder with the name “snappy” inside the snap-python folder. And inside snappy, it should be the snappy.ini
hzl
March 28, 2018, 3:43pm
#8
I see the problem: I installed it with python3.6+jpy, so the file is not there and it did not work …
thanks !