mobie / mobie-viewer-fiji

BSD 2-Clause "Simplified" License
29 stars 12 forks source link

NoClassDefFoundError: net/imglib2/realtransform/InvertibleWrapped2DTransformAs3D #1120

Closed tischi closed 3 months ago

tischi commented 3 months ago

Hi @nicokiaru, do you know how I can fix this?

The relevant pom is in the new-n5 branch: https://github.com/mobie/mobie-viewer-fiji/blob/new-n5/pom.xml

Exception in thread "main" java.lang.NoClassDefFoundError: net/imglib2/realtransform/InvertibleWrapped2DTransformAs3D
    at net.imglib2.realtransform.InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter.getRunTimeClass(InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter.java:50)
    at sc.fiji.persist.ScijavaGsonHelper.lambda$getGsonBuilder$0(ScijavaGsonHelper.java:103)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at sc.fiji.persist.ScijavaGsonHelper.getGsonBuilder(ScijavaGsonHelper.java:93)
    at sc.fiji.persist.ScijavaGsonHelper.getGson(ScijavaGsonHelper.java:61)
    at sc.fiji.bdvpg.scijava.services.SourceAndConverterBdvDisplayService.setDefaultBdvSupplier(SourceAndConverterBdvDisplayService.java:132)
    at org.embl.mobie.lib.bdv.view.SliceViewer.createBdv(SliceViewer.java:215)
NicoKiaru commented 3 months ago

You can try to use the latest stable version of bigwarp fiji

tischi commented 3 months ago

Done here, but the error stays the same.

In fact, I am curious, because I did not explictly have bigwarp in the list of dependencies, but I am using it in the code. I guess that means that something shipped that transitively...

tischi commented 3 months ago

Weird: the class InvertibleWrapped2DTransformAs3D does not exist here: https://github.com/imglib/imglib2-realtransform/tree/master/src/main/java/net/imglib2/realtransform nor does InvertibleWrapped2DTransformAs3DRealTransformRunTimeAdapter exist....?!

tischi commented 3 months ago

Wow, I understand, you are using the same package name net.imglib2.realtransform in bdv-playground! I did not even know that this is allowed! Is that common practice?


OK, It works now, I needed to move the explicit bigwarp import higher up in the pom. Could it be that the version that you are shipping in bdv-pl is too old?