Fiji updater and CSBDeep dependency

@frauzufall @bwilhelm @fjug @ctrueden

Hello all!

Technical question concerning imagej-tensorflow.jar and csbdeep.jar.
We provide our users with >50 shared machines and VMs and in order to make sure they all constantly share the same Fiji version, we deploy a controlled version of Fiji from which we removed the updater.jar in order to make sure that it be can’t updated.

Unfortunately, it seems to me that this updater.jar is listed as a dependency of both imagej-tensorflow.jar and csbdeep.jar (based on my limited understanding of the imagej updater) and is required to run CSBDeep plugins.

Unless you have a better idea to forbid uncontrolled updates than bluntly removing the updater.jar, do you think it would it be possible to remove this dependency?



I would like to add a global switch to the Updater that completely disables it without needing to remove the JAR. But we haven’t done that yet. There is a closed issue which discusses the matter in a bit more technical detail.

In the meantime, it should indeed work to delete the updater JAR.

Does the code fail to execute correctly without the updater JAR being present? What is the error message? IMHO, we should fix it to still work!

The issue is almost certainly due to this code in ImageJ TensorFlow:

$ git grep UpdaterUtil
src/main/java/net/imagej/tensorflow/ui/ net.imagej.updater.util.UpdaterUtil;
src/main/java/net/imagej/tensorflow/ui/ String platform = UpdaterUtil.getPlatform();
src/main/java/net/imagej/tensorflow/util/ net.imagej.updater.util.UpdaterUtil;
src/main/java/net/imagej/tensorflow/util/   private static final String PLATFORM = UpdaterUtil.getPlatform();

But we should just put a try/catch around it, in case the updater is not available. But again, a stack trace would help narrow down where we should put it.

Or even better: it looks like the only usage of Updater code is to call the getPlatform() method? But we have the PlatformService already for that. @frauzufall Any reason you weren’t able to use the PlatformService functionality (or even org.scijava.util.PlatformUtils) here? Or just ignorance? If there’s no other reason, I can look at changing it over—just let me know.



A switch would be perfect indeed.

The code fails when starting a N2V or a CSBDeep demo pipeline.

When starting N2V train + predict pipeline:

[INFO] Load TensorFlow..
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/imagej/updater/util/UpdaterUtil
	at java.util.concurrent.FutureTask.get(
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.NoClassDefFoundError: net/imagej/updater/util/UpdaterUtil
	at net.imagej.tensorflow.util.TensorFlowUtil.<clinit>(
	at net.imagej.tensorflow.DefaultTensorFlowService.getCrashFile(
	at net.imagej.tensorflow.DefaultTensorFlowService.loadLibrary(
	at de.csbdresden.n2v.train.N2VTraining.init(
	at de.csbdresden.n2v.command.N2VTrainPredictCommand.mainThread(
	at java.util.concurrent.Executors$
	... 4 more
Caused by: java.lang.ClassNotFoundException: net.imagej.updater.util.UpdaterUtil
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	... 10 more

Let me know if I can add anything.

Thanks @sebherbert. I am heavily focused on getting the new ImageJ website launched this week, but will look into updating imagej-tensorflow not to use imagej-updater classes soon. I’ve added this thread to my community tasks list.


No emergency at all!