java.lang.IllegalArgumentException error

Hi all,

I’m attempting to open a Sentinel-5 product within SNAP 7.0 and I’m receiving an Unexpected Exception message, stating “A java.lang.IllegalArgumentException exception has occured”. The details are as follows:

java.lang.IllegalArgumentException: SampleCoding contains already an attribute with the name ‘success’
at org.esa.snap.core.datamodel.SampleCoding.addAttribute(SampleCoding.java:57)
at org.esa.snap.core.datamodel.SampleCoding.addSamples(SampleCoding.java:92)
at org.esa.snap.dataio.netcdf.metadata.profiles.cf.CfBandPart.addSamples(CfBandPart.java:429)
at org.esa.snap.dataio.netcdf.metadata.profiles.cf.CfBandPart.addSampleCodingOrMasksIfApplicable(CfBandPart.java:338)
at org.esa.snap.dataio.netcdf.metadata.profiles.cf.CfBandPart.addBand(CfBandPart.java:224)
at org.esa.snap.dataio.netcdf.metadata.profiles.cf.CfBandPart.lambda$decode$0(CfBandPart.java:181)
at org.esa.snap.core.util.ForLoop.loopN(ForLoop.java:52)
at org.esa.snap.core.util.ForLoop.execute(ForLoop.java:43)
at org.esa.snap.core.util.ForLoop.execute(ForLoop.java:37)
at org.esa.snap.dataio.netcdf.metadata.profiles.cf.CfBandPart.decode(CfBandPart.java:161)
at org.esa.snap.dataio.netcdf.NetCdfReadProfile.readProduct(NetCdfReadProfile.java:54)
at org.esa.snap.dataio.netcdf.DefaultNetCdfReader.readProductNodesImpl(DefaultNetCdfReader.java:60)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:169)
at org.esa.snap.dataio.netcdf.GenericNetCdfReader.readProductNodesImpl(GenericNetCdfReader.java:77)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:169)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:161)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:55)
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)

Has anyone encountered this error message previously? I’ve rolled back to SNAP 6.0 and the same product is opening without an issue, so I’m wondering if there is maybe a bug within SNAP 7.0?

Actually, the issue was in SNAP 6, to allow two flags with the same name (SNAP-1094).
However, in SNAP 7 occurs another issue which then leads to the error. This will be fixed in an update soon.

However, Sentinel-5p is not supported by SNAP in the first place.
It can only be read by the generic NetCDF reader.
If you want to work with S5p data I would suggest that you use http://www.stcorp.nl/beat/

1 Like