Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with new imglib2-cache? #28

Closed
caylamiller opened this issue Mar 1, 2021 · 3 comments
Closed

Incompatibility with new imglib2-cache? #28

caylamiller opened this issue Mar 1, 2021 · 3 comments

Comments

@caylamiller
Copy link

Hello, I recently installed a new version of the imglib2-cache jar (released Feb 22) when adding another update site and it seemed to break n2v. I was able to train data but would get an error related to this jar when trying to predict. I rolled it back to a previous version of the file I had (beta-13, whereas the newer one was I think beta-16) and n2v works fine now for me. I'm assuming this might cause problems for others newly installing n2v (or updating other plugins) so wanted to let ya'll know. :)

@fjug
Copy link
Member

fjug commented Mar 2, 2021

Thanks a lot for pointing this out... we will look into that! @tpietzsch @maarzt @tibuch (and maybe @frauzufall)

@jdeschamps
Copy link
Member

jdeschamps commented Mar 2, 2021

For reference, this is probably the exception encountered:

java.lang.NoClassDefFoundError: net/imglib2/cache/img/DiskCachedCellImgOptions$CacheType
	at net.imagej.modelzoo.consumer.tiling.TiledImageDataReference.createTiledOutputView(TiledImageDataReference.java:204)
	at net.imagej.modelzoo.consumer.tiling.TiledImageDataReference.createTiledOutputView(TiledImageDataReference.java:163)
	at net.imagej.modelzoo.consumer.tiling.DefaultTiling.init(DefaultTiling.java:105)
	at net.imagej.modelzoo.consumer.TiledPredictionExecutor.initTiling(TiledPredictionExecutor.java:188)
	at net.imagej.modelzoo.consumer.TiledPredictionExecutor.run(TiledPredictionExecutor.java:84)
	at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.executePrediction(AbstractModelZooPrediction.java:210)
	at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.run(AbstractModelZooPrediction.java:105)
	at net.imagej.modelzoo.consumer.command.AbstractSingleImagePredictionCommand.run(AbstractSingleImagePredictionCommand.java:101)
	at de.csbdresden.n2v.command.N2VPredictCommand.run(N2VPredictCommand.java:59)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: net.imglib2.cache.img.DiskCachedCellImgOptions$CacheType
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 18 more

The newest imglib2-cache version on the update site is 1.0.0-beta-16. Since imglib/imglib2-cache@3d269bf, CacheType has been moved to CacheOptions.java.

The problem is actually in imagej-modelzoo and it probably needs to be recompiled and updated on the update site in order to point to the correct Class path.

edit: by updating model-zoo pom to scijava-pom 30.0.0, and recompiling, the error disappears. I will open an github issue on the imagej-modelzoo repo. -> see issue

@jdeschamps
Copy link
Member

Hi!

I fixed and updated imagej-modelzoo on FIji, so N2V and DenoiSeg should be working again now.

Thanks again for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants