Fiji won't open CZI files after update - There was a problem with the class Java

Hello, Fiji has been able to open and process .czi files without problems until I added new plugins/updated this morning. I added the radial Symmetry, radial intensity profile and results to excel plugins. Now I cannot open my .czi files, either by directly opening, dragging from a folder, or by using the opened recently tab.Other files such as .tiff open ok.

I have tried reinstalling Fiji, and it works fine…until I add the plugins I want to use and I’m back to being unable to open the files. The console gives the following errors.

Does anyone have any suggestions on how to get it work work normally with the plugins I want to use?

UPDATE: This issue happens on Mac OSX and Linux (Elementary OS). Removing the plugins through the updater doesn’t get rid of the error. Uninstalling/installing the latest version of Fiji on both machine allows .czi files to be opened, however the error returns once updater is run and new plugins added.

There was a problem with the class java.nio.ByteBuffer which can be found here:
/Applications/Fiji.app/java/macosx/adoptopenjdk-8.jdk/jre/Contents/Home/jre/lib/rt.jar
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:650)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:133)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:151)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:165)
	at loci.common.Location.getHandle(Location.java:522)
	at loci.common.Location.getHandle(Location.java:462)
	at loci.common.Location.getHandle(Location.java:443)
	at loci.common.Location.getHandle(Location.java:426)
	at loci.common.Location.checkValidId(Location.java:551)
	at loci.formats.ImageReader.getReader(ImageReader.java:182)
	at loci.plugins.in.ImportProcess.createBaseReader(ImportProcess.java:627)
	at loci.plugins.in.ImportProcess.initializeReader(ImportProcess.java:485)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:138)
	at loci.plugins.in.Importer.showDialogs(Importer.java:140)
	at loci.plugins.in.Importer.run(Importer.java:76)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
	at ij.io.Opener.openImage(Opener.java:370)
	at ij.io.Opener.openImage(Opener.java:242)
	at ij.io.Opener.open(Opener.java:109)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.lang.Thread.run(Thread.java:748)

[ERROR] java.lang.NoSuchMethodException: Could not find method java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
There was a problem with the class java.nio.ByteBuffer which can be found here:
/Applications/Fiji.app/java/macosx/adoptopenjdk-8.jdk/jre/Contents/Home/jre/lib/rt.jar
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:650)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:133)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:151)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:165)
	at loci.common.Location.getHandle(Location.java:522)
	at loci.common.Location.getHandle(Location.java:462)
	at loci.common.Location.getHandle(Location.java:443)
	at loci.common.Location.getHandle(Location.java:426)
	at loci.common.Location.checkValidId(Location.java:551)
	at loci.formats.ImageReader.getReader(ImageReader.java:182)
	at loci.plugins.in.ImportProcess.createBaseReader(ImportProcess.java:627)
	at loci.plugins.in.ImportProcess.initializeReader(ImportProcess.java:485)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:138)
	at loci.plugins.in.Importer.showDialogs(Importer.java:140)
	at loci.plugins.in.Importer.run(Importer.java:76)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
	at ij.io.Opener.openImage(Opener.java:370)
	at ij.io.Opener.openImage(Opener.java:242)
	at ij.io.Opener.open(Opener.java:109)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.lang.Thread.run(Thread.java:748)

	at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:650)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:133)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:151)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:165)
	at loci.common.Location.getHandle(Location.java:522)
	at loci.common.Location.getHandle(Location.java:462)
	at loci.common.Location.getHandle(Location.java:443)
	at loci.common.Location.getHandle(Location.java:426)
	at loci.common.Location.checkValidId(Location.java:551)
	at loci.formats.ImageReader.getReader(ImageReader.java:182)
	at loci.plugins.in.ImportProcess.createBaseReader(ImportProcess.java:627)
	at loci.plugins.in.ImportProcess.initializeReader(ImportProcess.java:485)
	at loci.plugins.in.ImportProcess.execute(ImportProcess.java:138)
	at loci.plugins.in.Importer.showDialogs(Importer.java:140)
	at loci.plugins.in.Importer.run(Importer.java:76)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
	at ij.io.Opener.openImage(Opener.java:370)
	at ij.io.Opener.openImage(Opener.java:242)
	at ij.io.Opener.open(Opener.java:109)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.lang.Thread.run(Thread.java:748)
Exception in thread "RecentOpener" java.lang.RuntimeException: Macro canceled
	at ij.IJ.runUserPlugIn(IJ.java:255)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
	at ij.IJ.runUserPlugIn(IJ.java:230)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
	at ij.io.Opener.openImage(Opener.java:370)
	at ij.io.Opener.openImage(Opener.java:242)
	at ij.io.Opener.open(Opener.java:109)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.lang.Thread.run(Thread.java:748)
[INFO] Reading available sites from https://imagej.net/
3 Likes

A question to the @OMETeam:

could it be that the latest update of Bio-Formats was compiled using JDK9 or later?

Here’s a similar issue on an unrelated repository where this was brought up:

I’m having exact same error here with Slidebook files in Win10.

I am facing the same issue but with .nd2 files. (Mac OS Catalina)

didn’t see your posting. Sorry for the double post. I can confirm the issue. See here:

It is related to the last changes on the Bio-Formats update site.

Running Win10, most recent Fiji (only Bio-Formats site additionally activated)

3 Likes

That worked! Thank you!

@biovoxxel thank you for that, it’s working again after unchecking bio formats :slight_smile:

Hi all,

thanks all for spotting this, reporting it promptly and finding a quick workaround. A new patch release of ome-common has been cut, uploaded to Maven Central. the component was bumped in merged https://github.com/ome/bioformats/pull/3593 and has been automatically pushed to the development Bio-Formats update site.

@imagejan and @biovoxxel are absolutely correct about the JDK incompatibility issue as the JARs have been unwillingly compiled with JDK14 as the manifest indicates. I am in the process of cutting a new patch release with JDK 8 and this will be updated first the development line of Bio-Formats and then on the development update site soon.

Sorry again for the inconvenience,
Sebastien

PS: if anyone knows of a reliable way to catch these types of issues early, I am very interested.

5 Likes

As an update the ome-common patch release mentioned by Seb above is now available on the Bio-Formats update site. This should resolve the issues people have been seeing.

3 Likes