Cannot load NovaSAR data: s1tbx NoSuchMethodError

Hi,

I’m using the NovaSAR plugin and cannot load NovaSAR data due to the NoSuchMethodError exception below that appears in the Snap messages.log file.

I realise that probably only a minority use the NovaSAR plugin, but the missing method (SARReader.createVirtualIntensityBand) should be in the s1tbx toolbox and is just called by the plugin.

I can compile the plugin, so the method must be there at compile time, but not runtime (I presume). I have also tried moving the C:\Program Files\snap\s1tbx directory to a different location in case this is where SNAP is trying to load the s1tbx toolbox and was missing the method, and restarted Snap, but this makes no difference.

Any help would be much appreciated,

Brian

java.lang.NoSuchMethodError: org.esa.s1tbx.commons.io.SARReader.createVirtualIntensityBand(Lorg/esa/snap/core/datamodel/Product;Lorg/esa/snap/core/datamodel/Band;Ljava/lang/String;)V
at com.airbus.snap.dataio.novasar.NovaSARProductDirectory.addBands(NovaSARProductDirectory.java:258)
at org.esa.s1tbx.commons.io.AbstractProductDirectory.createProduct(AbstractProductDirectory.java:299)
at com.airbus.snap.dataio.novasar.NovaSARProductReader.readProductNodesImpl(NovaSARProductReader.java:111)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:179)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:61)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

I have resolved the issue myself. It turns out that there is a ‘breaking’ change to the SARReader.createVirtualIntensityBand() method signature between 8.0.0 and 8.0.4 (the current latest version).

The solution I found was to change the s1txb repo version in the pom.xml file:
from:
<s1tbx.version>8.0.0</s1tbx.version>
to
<s1tbx.version>8.0.4</s1tbx.version>

and recompiling and reinstalling the plugin. The SARReader.createVirtualIntensityBand() NovaSAR plugin was then called without throwing an exception, and the bands were loaded in.

I’ve since realised that the problem affected the loading in of SRD, SCD and GRD NovaSAR Level 1 products; SLC data is not affected. See the NovaSARProductReader::addBands() method in the NovaSAR plugin.

1 Like

The breaking change between 8.0.0 and 8.0.4 was the change in the method’s return type, i.e. from:

8.0.0:
public static void createVirtualIntensityBand(final Product product, final Band band, final String countStr)

to 8.0.4:
public static Band createVirtualIntensityBand(final Product product, final Band band, final String countStr)