JPY class not found ValueError for class VectorDataLayer

Hi,

I am trying to use Snappy in Python to create a subimage of a product and then draw something on the subimage.

I have successfully implemented creating the subimage, but I am having trouble with the drawing part - I know I could write working code, but a ValueError is stopping me from achieving that. More precisely, I can’t seem to import VectorDataLayer from org.esa.snap.ui.product.VectorDataLayer using the command jpy.get_type(‘org.esa.snap.ui.product.VectorDataLayer’), jpy being snappy.jpy. All other previous imports work properly.

What could be the cause of this and how can I fix it?

Mmmh, get_type() should work.
Is there more information in the error message? If not, you can modify the __init.py__ of snappy.
you can modify line ~75 to

jpy.diag.flags = jpy.diag.F_ALL

Then you should see more output. Maybe too much…