Java error when calling GPT from command line

I get the following error when trying to call the GPT on the command line (through a shell script):

Error: java.lang.ClassNotFoundException: org.esa.snap.framework.gpf.main.GPT
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.esa.snap.framework.gpf.main.GPT
at org.esa.snap.runtime.Launcher.lambda$run$12(
at org.esa.snap.runtime.Engine.runClientCode(
at org.esa.snap.runtime.Launcher.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.exe4j.runtime.LauncherEngine.launch(
at com.install4j.runtime.launcher.UnixLauncher.main(
Caused by: java.lang.ClassNotFoundException: org.esa.snap.framework.gpf.main.GPT
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.esa.snap.runtime.Launcher.lambda$run$12(
… 9 more

It is exactly the same error as that mentioned in another s1tbx thread (ClassNotFoundException when calling gpt from the command line), but having updated my version of SNAP (after the 28/1/2016 release), the problem is still not fixed. I have tried processing the RS2 data that I am using from scratch, including re-unzipping them, and still no luck.

Is this a glitch in the current version of SNAP, or am I doing something wrong?


Probably you have started with a beta version and have only updated via the plugin manager. You should uninstall and reinstall SNAP. Also you should ensure that the SNAP configuration directories are deleted. See image:

Thank you very much, that seems to have done the trick!

However, now when I run my scripts I get the following errors:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/snap/snap/modules/ext/org.esa.snap.snap-netcdf/org-slf4j/slf4j-simple.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/snap/./snap/modules/ext/org.esa.snap.snap-netcdf/org-slf4j/slf4j-simple.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]

These do not by themselves stop the GPT from running, and the output seems to be fine. Are they something I should worry about?

No don’t worry. Just stupid log messages we couldn’t get rid of them yet. It is logged by a library we use.