BIOP / qupath-extension-biop-omero

QuPath extension to work with images through OMERO's Java API (raw)
GNU General Public License v3.0
4 stars 1 forks source link

FYI: QuPath 0.5.0 doesn't read into extensions subfolders #25

Closed psobolewskiPhD closed 8 months ago

psobolewskiPhD commented 11 months ago

This QuPath issue is pretty degenerate with this extension: https://github.com/qupath/qupath/issues/1439 Putting the lib folder with the Ice Java library into the QuPath extensions folder doesn't work--the libs aren't found. Not only does the extension not work, but images can't be opened via drag and drop:

11:26:39.488    [JavaFX Application Thread] ERROR   qupath.lib.gui.viewer.DragDropImportListener    java.lang.NoClassDefFoundError: omero/ServerError   java.io.IOException: java.lang.NoClassDefFoundError: omero/ServerError
    at qupath.lib.gui.viewer.DragDropImportListener.handleFileDrop(DragDropImportListener.java:290)
    at qupath.lib.gui.viewer.DragDropImportListener.lambda$handle$0(DragDropImportListener.java:196)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: java.lang.NoClassDefFoundError: omero/ServerError
    at qupath.ext.biop.servers.omero.raw.OmeroRawImageServerBuilder.supportLevel(OmeroRawImageServerBuilder.java:96)
    at qupath.ext.biop.servers.omero.raw.OmeroRawImageServerBuilder.checkImageSupport(OmeroRawImageServerBuilder.java:134)
    at qupath.lib.images.servers.ImageServerProvider.getServerBuilders(ImageServerProvider.java:198)
    at qupath.lib.images.servers.ImageServerProvider.getPreferredUriImageSupport(ImageServerProvider.java:223)
    at qupath.lib.gui.QuPathGUI.openImage(QuPathGUI.java:1702)
    at qupath.lib.gui.viewer.DragDropImportListener.handleFileDropImpl(DragDropImportListener.java:537)
    at qupath.lib.gui.viewer.DragDropImportListener.handleFileDrop(DragDropImportListener.java:286)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: omero.ServerError
    at java.base/java.net.URLClassLoader.findClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    ... 12 more
imagesc-bot commented 11 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/qupath-script-editor-error-when-trying-to-open-saved-script/89826/3

Shubhranshu2411 commented 11 months ago

For me adding the libs in QuPath/app and adding the cfg:

[Application]
app.classpath=$APPDIR\libs\*

worked in windows 10

Rdornier commented 11 months ago

Alternatively, and until this QuPath bug will be fixed, instead of the libs folder, you can add the OMERO-Fiji plugin Image J / Fiji - omero_ij-5.8.3-all.jar. This fat jar replaces the libs folder. It can be dowloaded from here https://www.openmicroscopy.org/omero/downloads/

psobolewskiPhD commented 11 months ago

Alternatively, and until this QuPath bug will be fixed, instead of the libs folder, you can add the OMERO-Fiji plugin Image J / Fiji - omero_ij-5.8.3-all.jar. This fat jar replaces the libs folder. It can be dowloaded from here https://www.openmicroscopy.org/omero/downloads/

I can confirm this works! Is there any drawback to this vs the lib folder? The later is a bigger download too. Perhaps update the README?

Rdornier commented 11 months ago

The only drawback I can see is dependencies version mismatch. The fat jar contains plenty of other single jars ; if you already have one of those in your dependency folder, you may face with conflicting versions.

But until now, I'm used to have this fat jar and I never encountered any issues.

Perhaps update the README?

It's updated, thanks.

Rdornier commented 8 months ago

This issue has been fixed in QuPath 0.5.1