slf4j errors in SNAP

sorry for yet another issue — trying to transfer our processing chains to SNAP:

After my first install, gpt command line worked except the bug mentioned in a previous post.

I uninstalled and reinstalled SNAP. Since then I keep getting this message when running gpt command line (GUI works fine).

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

For some reason I can get rid of this error by going to these folders:

C:\Program Files\snap\s1tbx\modules\ext\org.esa.s1tbx.s1tbx-io\org-slf4j
C:\Program Files\snap\snap\modules\ext\org.esa.snap.snap-netcdf\org-slf4j

and replacing the file in the folders below with this one “slf4j-simple-1.7.12.jar” as described here http://stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder

but then I get this error message. The previous version of S1TBX (not having the issue above) gives me the same error:

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at ucar.nc2.iosp.hdf5.H5header.(H5header.java:71)
at org.esa.snap.dataio.netcdf.util.NetcdfFileOpener.open(NetcdfFileOpener.java:104)
at gov.nasa.gsfc.seadas.dataio.L1ProductReaderPlugIn.getDecodeQualification(L1ProductReaderPlugIn.java:96)
at org.esa.snap.framework.dataio.ProductIO.getProductReaderForInput(ProductIO.java:259)
at org.esa.snap.gpf.operators.standard.ReadOp.initialize(ReadOp.java:77)
at org.esa.snap.framework.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:491)
at org.esa.snap.framework.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:270)
at org.esa.snap.framework.gpf.Operator.getTargetProduct(Operator.java:350)
at org.esa.snap.framework.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:74)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
at org.esa.snap.framework.gpf.graph.GraphContext.(GraphContext.java:91)
at org.esa.snap.framework.gpf.graph.GraphContext.(GraphContext.java:64)
at org.esa.snap.framework.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:130)
at org.esa.snap.framework.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:84)
at org.esa.snap.framework.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:509)
at org.esa.snap.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:357)
at org.esa.snap.framework.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:250)
at org.esa.snap.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:151)
at org.esa.snap.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:123)
at org.esa.snap.framework.gpf.main.GPT.run(GPT.java:54)
at org.esa.snap.framework.gpf.main.GPT.main(GPT.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.esa.snap.runtime.Launcher.lambda$run$9(Launcher.java:55)
at org.esa.snap.runtime.Launcher$$Lambda$22/1552787810.run(Unknown Source)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:177)
at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 42 more

Note that you can ignore these ugly messages, They are indeed annoying, but not harmful. I hope to have fixed this for the public release.

Thanks for reporting!

Hi Norman

thanks again for the info, but since reinstall I keep getting either this error or the one further below, so now I cannot run anything from command line:

INFO: org.geotools.referencing.factory.epsg.ThreadedEpsgFactory: Setting the EPS
G factory org.geotools.referencing.factory.epsg.DefaultFactory to a 1800000ms ti
meout
INFO: org.geotools.referencing.factory.epsg.ThreadedEpsgFactory: Setting the EPS
G factory org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory to a 180
0000ms timeout
INFO: org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory: Building ne
w data source for org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory
INFO: org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory: Building ba
cking store for org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory
org.esa.snap.framework.gpf.OperatorException: Not able to write product file: ‘C
:\Program Files\snap$target’
at org.esa.snap.framework.gpf.graph.GraphProcessor$GPFImagingListener.er
rorOccurred(GraphProcessor.java:373)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTi
leScheduler.java:1646)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler
.java:921)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
Caused by: org.esa.snap.framework.gpf.OperatorException: Not able to write produ
ct file: ‘C:\Program Files\snap$target’
at org.esa.snap.gpf.operators.standard.WriteOp.doExecute(WriteOp.java:26
7)
at org.esa.snap.framework.gpf.internal.OperatorContext.executeOperator(O
peratorContext.java:1265)
at org.esa.snap.framework.gpf.internal.OperatorImage.computeRect(Operato
rImage.java:65)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:
137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler
.java:904)
… 3 more
Caused by: java.io.IOException: failed to create data output directory: .$targe
t.data
at org.esa.snap.dataio.dimap.DimapProductWriter.initDirs(DimapProductWri
ter.java:148)
at org.esa.snap.dataio.dimap.DimapProductWriter.writeProductNodesImpl(Di
mapProductWriter.java:109)
at org.esa.snap.framework.dataio.AbstractProductWriter.writeProductNodes
(AbstractProductWriter.java:109)
at org.esa.snap.gpf.operators.standard.WriteOp.doExecute(WriteOp.java:26
5)
… 7 more

or this error (not sure why a few times this one):

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at ucar.nc2.iosp.hdf5.H5header.(H5header.java:71)
at org.esa.snap.dataio.netcdf.util.NetcdfFileOpener.open(NetcdfFileOpener.java:104)
at gov.nasa.gsfc.seadas.dataio.L1ProductReaderPlugIn.getDecodeQualification(L1ProductReaderPlugIn.java:96)
at org.esa.snap.framework.dataio.ProductIO.getProductReaderForInput(ProductIO.java:259)
at org.esa.snap.gpf.operators.standard.ReadOp.initialize(ReadOp.java:77)
at org.esa.snap.framework.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:491)
at org.esa.snap.framework.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:270)
at org.esa.snap.framework.gpf.Operator.getTargetProduct(Operator.java:350)
at org.esa.snap.framework.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:74)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.framework.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
at org.esa.snap.framework.gpf.graph.GraphContext.(GraphContext.java:91)
at org.esa.snap.framework.gpf.graph.GraphContext.(GraphContext.java:64)
at org.esa.snap.framework.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:130)
at org.esa.snap.framework.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:84)
at org.esa.snap.framework.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:509)
at org.esa.snap.framework.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:357)
at org.esa.snap.framework.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:250)
at org.esa.snap.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:151)
at org.esa.snap.framework.gpf.main.CommandLineTool.run(CommandLineTool.java:123)
at org.esa.snap.framework.gpf.main.GPT.run(GPT.java:54)
at org.esa.snap.framework.gpf.main.GPT.main(GPT.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.esa.snap.runtime.Launcher.lambda$run$9(Launcher.java:55)
at org.esa.snap.runtime.Launcher$$Lambda$22/1552787810.run(Unknown Source)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:177)
at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 42 more

If you read the stack trace (which is no fun) you see the line

and then

Again, the error message is a mess, but the reason for it may simply be that the parameter ‘target.data’ is used in the graph but not passed as a parameter.

– Norman

Hi Norman

the curious thing is that the exactly same setup and command works in Nest 4.1 — trying to run processing chains that are fully operational on Nest 4.1 — is S1TBX more sensitive to this?

How would I write the <file> node in the Write function of the xml file then, when using this command?
gpt “C:\Nest\Calib_Spk_repro.xml” -Pfile=“C:\temp\RS2_20150601\product.xml” -t “C:\temp\test.dim”

Removing the target parameter by just using </file> or even writing the meant outputfile in the xml-file and trying this

gpt “C:\Nest\Calib_Spk_repro.xml” -Pfile=“C:\temp\RS2_20150601\product.xml” -t “C:\temp\test.dim”

or this (which should write to default output)
gpt “C:\Nest\Calib_Spk_repro.xml” -Pfile=“C:\temp\RS2_20150601\product.xml”

both gives this error:

INFO: org.geotools.referencing.factory.epsg.ThreadedEpsgFactory: Setting the EPS
G factory org.geotools.referencing.factory.epsg.DefaultFactory to a 1800000ms ti
meout
INFO: org.geotools.referencing.factory.epsg.ThreadedEpsgFactory: Setting the EPS
G factory org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory to a 180
0000ms timeout
INFO: org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory: Building ne
w data source for org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory
INFO: org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory: Building ba
cking store for org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory
org.esa.snap.framework.gpf.OperatorException: [output] is null
at org.esa.snap.framework.gpf.graph.GraphProcessor$GPFImagingListener.er
rorOccurred(GraphProcessor.java:373)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTi
leScheduler.java:1646)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler
.java:921)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
Caused by: java.lang.IllegalArgumentException: [output] is null
at org.esa.snap.util.Guardian.assertNotNull(Guardian.java:67)
at org.esa.snap.framework.dataio.AbstractProductWriter.writeProductNodes
(AbstractProductWriter.java:103)
at org.esa.snap.gpf.operators.standard.WriteOp.doExecute(WriteOp.java:26
5)
at org.esa.snap.framework.gpf.internal.OperatorContext.executeOperator(O
peratorContext.java:1265)
at org.esa.snap.framework.gpf.internal.OperatorImage.computeRect(Operato
rImage.java:65)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:
137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler
.java:904)
… 3 more

Error: [output] is null