Unexpected Exception with SNAP trying to open Sentinel-2 products


since - I think - two days my SNAP has problems with opening the .xml-files from the Sentinel-2 products. I get an error-message:
Unexcepted Exception

More Details:

java.lang.IllegalArgumentException: Crop The rectangular crop area must not be outside the image.
at javax.media.jai.JAI.createNS(JAI.java:1087)
at javax.media.jai.JAI.create(JAI.java:973)
at javax.media.jai.operator.CropDescriptor.create(CropDescriptor.java:286)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.cropBordersOutsideScene(Sentinel2OrthoProductReader.java:1588)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.addAnglesBands(Sentinel2OrthoProductReader.java:538)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReader.getMosaicProduct(Sentinel2OrthoProductReader.java:349)
at org.esa.s2tbx.dataio.s2.Sentinel2ProductReader.readProductNodesImpl(Sentinel2ProductReader.java:158)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:169)
at org.esa.s2tbx.dataio.s2.ortho.Sentinel2OrthoProductReaderProxy.readProductNodes(Sentinel2OrthoProductReaderProxy.java:104)
at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:161)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:51)
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)


please, could you tell me one example of a problematic product to try to reproduce the error?

Of course.

Products which produce the mentioned error:

  • S2A_MSIL1C_20161028T195632_N0204_R056_T01CEQ_20161028T195642.SAFE
  • S2A_MSIL1C_20161028T195632_N0204_R056_T01CER_20161028T195642.SAFE

I have more, but I think these could help. When more are needed just ask.

I have just downloaded both products and I have no problem when opening them in SNAP. The only anomaly I can see is that the viewing angles are not in the metadata.
Are you using the latest version of SNAP and S2TBX? I think that we fixed a bug in version 6.0.1 which I am pretty sure that is causing your error:
So if you update your SNAP installation (Menu->Tools->Plugin->Updates), probably it will open the products properly.

1 Like

Okay, at the moment I’m using SNAP 5.0.8. I will update it to the newest version.
But with the update tool SNAP just tells me that I’m up to date.

It is normal for version 5 since there are no more updates. You need to install version 6 and then update it.

Yeah, I’m on my way to do this. :slight_smile:

We should send “please update to latest version”-messages to users of old unsupported SNAP versions.


Yeah, at least because it is a little bit confusing when your SNAP is telling you, that your version is up to date. :smiley: But no mention that there is a new supported version.