It’s not the same as the issue SNAP-1367. It’s does not even try to install updates as it does not found any.
Anyway, I tried to install the fonts, but it does not change anything.
I have rebuilt the Alpine based docker image today, still no way to update to SNAP 8.0.3:
docker pull mundialis/esa-snap:s1tbx
docker run -it --rm 9ec75d7c0903 /bin/sh
/ # /usr/local/snap/bin/snap --nosplash --nogui --modules --update-all
/usr/local/snap/bin/../platform/lib/nbexec: WARNING: environment variable DISPLAY is not set
Refreshing SNAP Supported Plugins
Refreshing SNAP Core
Refreshing SNAP Toolboxes
Will update org.csa.rstb.rstb.op.polarimetric.tools@8.0.0 to version 8.0.1
Will update org.esa.snap.snap.temporal.percentile@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.unmix.ui@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.pgx.reader@8.0.0 to version 8.0.3
...
Will update org.esa.snap.snap.ndvi@8.0.0 to version 8.0.3
Will update org.esa.s1tbx.s1tbx.op.calibration@8.0.0 to version 8.0.1
updates=102
Establishing a connection ...
Establishing a connection ...
SNAP Core Library
SNAP Core Library
SNAP Python Interface
SNAP Python Interface
SNAP Remote Products Repository
SNAP Remote Products Repository
SNAP NetCDF Product Reader/Writer
SNAP NetCDF Product Reader/Writer
...
NASA Blue Marble Worldmap
SNAP Help
SNAP Help
null
null
Exception in thread "main" java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<init>(SunFontManager.java:376)
at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
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:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at sun.font.SunFontManager.getInstance(SunFontManager.java:250)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1119)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1617)
at javax.swing.text.PlainView.calculateLongestLine(PlainView.java:639)
at javax.swing.text.PlainView.updateMetrics(PlainView.java:209)
at javax.swing.text.PlainView.updateDamage(PlainView.java:527)
at javax.swing.text.PlainView.insertUpdate(PlainView.java:451)
at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610)
at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869)
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1669)
at org.netbeans.updater.UpdaterFrame.initComponents(UpdaterFrame.java:175)
at org.netbeans.updater.UpdaterFrame.<init>(UpdaterFrame.java:128)
at org.netbeans.updater.UpdaterFrame.main(UpdaterFrame.java:253)
Will update org.csa.rstb.rstb.op.polarimetric.tools@8.0.0 to version 8.0.1
Will update org.esa.snap.snap.temporal.percentile@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.unmix.ui@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.pgx.reader@8.0.0 to version 8.0.3
...
Yes, I think the solution mark wrote is the best solution in the short or medium term.
Unfortunately, you need a desktop installation to retrieve the latest module updates.
There would be no problem to use the SNAP command line even in docker, but still there is the NullPointerException loop (see above):
Exception in thread “main” java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)
…
at org.netbeans.updater.UpdaterFrame.initComponents(UpdaterFrame.java:175)
at org.netbeans.updater.UpdaterFrame.(UpdaterFrame.java:128)
at org.netbeans.updater.UpdaterFrame.main(UpdaterFrame.java:253)
Thanks for the hint, the font addition seems to do the trick in Alpine:
docker run -it --rm mundialis/esa-snap sh
/ # apk add ttf-dejavu
...
Executing mkfontscale-1.2.1-r1.trigger
OK: 170 MiB in 71 packages
/ # /usr/local/snap/bin/snap --nosplash --nogui --modules --update-all
/usr/local/snap/bin/../platform/lib/nbexec: WARNING: environment variable DISPLAY is not set
Refreshing SNAP Supported Plugins
Refreshing SNAP Core
Refreshing SNAP Toolboxes
Will update org.csa.rstb.rstb.op.polarimetric.tools@8.0.0 to version 8.0.1
Will update org.esa.s2tbx.s2tbx.s2msi.reader@8.0.0 to version 8.0.1
Will update org.esa.snap.snap.temporal.percentile@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.unmix.ui@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.pgx.reader@8.0.0 to version 8.0.3
Will update org.esa.snap.snap.remote.products.repository@8.0.0 to version 8.0.3
Will update org.esa.s2tbx.s2tbx.forest.cover.change@8.0.0 to version 8.0.1
...
SNAP Standalone Tool Adapter GUI
SNAP Standalone Tool Adapter GUI
Sentinel-2 Toolbox Adapters Help
Sentinel-2 Toolbox Adapters Help
null
null
Updates not found.
updates=0
/ #
Indeed no more NullPointerException, even in Alpine!
Can I assume that the update was successful? If yes, then I’ll update the Dockerfile.
It’s not the same as the issue SNAP-1367. It’s does not even try to install updates as it does not found any.
Anyway, I tried to install the fonts, but it does not change anything. hellodear