End of cell error messages in groovy notebooks

The following was unexpected to me and lead to some confusion:
If you have a groovy notebook (pyimagej with beakerx installed) that looks like here bellow

%classpath config resolver imagej.public 'https://maven.imagej.net/content/groups/public'
%classpath add mvn net.imagej imagej 2.0.0-rc-69

ij = new net.imagej.ImageJ()

ds = ij.io().open('https://imagej.net/images/blobs.gif')
gc = ij.op().run('convert.int8', ds.getImgPlus().getImg())
bw = ij.op().run('threshold.otsu', gc)

import net.imglib2.algorithm.labeling.ConnectedComponents.StructuringElement
re = ij.op().run('labeling.cca', bw, StructuringElement.FOUR_CONNECTED)

This with yield the following error

java.lang.IllegalArgumentException: Unsupported image type: net.imglib2.roi.labeling.LabelingType

I jumped to the conclusion that this must be an issue with the ij.op().run('cca', ...). I tried a lot of variants of feeding the inputs to the cca-op before I realised that it is the notebook that cannot display the ImgLabeling. So adding for instance a print('this yields null) will make the error message disappear.

Even though this follows its own logic, this behaviour is peculiar among jupyter notebooks.