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

Zarr Export Dependency Error #38

Open
AdvancedImagingUTSW opened this issue Oct 24, 2024 · 0 comments
Open

Zarr Export Dependency Error #38

AdvancedImagingUTSW opened this issue Oct 24, 2024 · 0 comments

Comments

@AdvancedImagingUTSW
Copy link

In some ways, ran into some similar problems at this one before.

TLDR, N5Exception$N5NoSuchKeyException is missing from the n5 library and libblosc has to be imported from Fiji.


Cloned the most recent version and installed it with maven-3.9.9. Installed perfectly fine.

Attempted to run the software as follows:

#!/bin/bash
module load java/oracle/jdk1.8.0_231
module load hadoop/2.7.7
module load spark/2.2.2

export _JAVA_OPTIONS="$_JAVA_OPTIONS -Xms250G -Xmx450G -XX:PermSize=32m"


# Also requires libblosc for compression. Extracted from Fiji and placed here:
# /archive/bioinformatics/Danuser_lab/Dean/dean/applications/libblosc
export LD_LIBRARY_PATH="/archive/bioinformatics/Danuser_lab/Dean/dean/applications/Fiji/lib/linux64:$LD_LIBRARY_PATH"

# Move to the folder with the appropriate BigStitcher shell scripts. 
cd /archive/bioinformatics/Danuser_lab/Dean/dean/git/external/BigStitcher-Spark

XML_PATH="/.../2024-10-18-yuanyuan/38_100umrange_0.2umstep_Cell_005/CH00_000000.xml"

FUSED_PATH="/.../2024-10-18-yuanyuan/fused.zarr"

./affine-fusion -x "$XML_PATH" -o "$FUSED_PATH" -d /ch0/s0 -s N5 --multiRes --preserveAnisotropy --UINT16 --minIntensity 0 --maxIntensity 65535 --channelId 0

First had a libblosc error:

Compression 'org.janelia.saalfeldlab.n5.blosc.BloscCompression' could not be registered because:
java.lang.UnsatisfiedLinkError: Unable to load library 'blosc':
libblosc.so: cannot open shared object file: No such file or directory
libblosc.so: cannot open shared object file: No such file or directory

To get past this, I had to add Fiji's version to my LD_LIBRARY_PATH:

export LD_LIBRARY_PATH="/archive/bioinformatics/.../applications/Fiji/lib/linux64:$LD_LIBRARY_PATH"

Then, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/janelia/saalfeldlab/n5/N5Exception$N5NoSuchKeyException
	at net.preibisch.bigstitcher.spark.util.N5Util.createWriter(N5Util.java:45)
	at net.preibisch.bigstitcher.spark.SparkAffineFusion.call(SparkAffineFusion.java:275)
	at net.preibisch.bigstitcher.spark.SparkAffineFusion.call(SparkAffineFusion.java:63)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at net.preibisch.bigstitcher.spark.SparkAffineFusion.main(SparkAffineFusion.java:420)
Caused by: java.lang.ClassNotFoundException: org.janelia.saalfeldlab.n5.N5Exception$N5NoSuchKeyException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 12 more

After checking the pom.xml file, I see that n5 is indeed a dependency. I also checked the contents of the jar to see if this class existed...

jar tf ~/.m2/repository/org/janelia/saalfeldlab/n5/3.1.3/n5-3.1.3.jar | grep N5Exception

org/janelia/saalfeldlab/n5/N5Exception$N5ClassCastException.class
org/janelia/saalfeldlab/n5/N5Exception.class
org/janelia/saalfeldlab/n5/N5Exception$N5IOException.class

It seems as if the N5Exception$N5NoSuchKeyException is missing.

...

After all this, if I export to an n5 file, instead of a Zarr file, it works....

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

1 participant