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

BloscCompression Class Not Found #39

Open
AdvancedImagingUTSW opened this issue Apr 28, 2022 · 4 comments
Open

BloscCompression Class Not Found #39

AdvancedImagingUTSW opened this issue Apr 28, 2022 · 4 comments

Comments

@AdvancedImagingUTSW
Copy link

I am operating on a RedHat Linux server where I do not have sudo privileges. I thus took a different approach to testing this out.

  • cd /archive/MIL/dean/git/external
  • git clone https://github.com/saalfeldlab/n5-utils.git
  • cd n5-utils/
  • git submodule update --init --recursive
  • module load maven/3.5.3
  • ./install $HOME/bin
  • I added $HOME/bin to my .bashrc profile, rebooted terminal.
  • I then ran it on the output of BigStitcher-Spark... n5-view -i /archive/MIL/dean/2022-04-24-big-stitcher-spark-test/fused.n5 -d /ch488/s0
  • The data was properly loaded and displayed by BigDataViewer, but threw the following error:
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:303)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427)
    at com.sun.jna.Native.register(Native.java:1647)
    at com.sun.jna.Native.register(Native.java:1360)
    at org.blosc.IBloscDll.(IBloscDll.java:15)
    at org.blosc.JBlosc.init(JBlosc.java:30)
    at org.blosc.JBlosc.(JBlosc.java:24)
    at org.janelia.saalfeldlab.n5.blosc.BloscCompression.(BloscCompression.java:70)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.janelia.saalfeldlab.n5.CompressionAdapter.update(CompressionAdapter.java:82)
    at org.janelia.saalfeldlab.n5.CompressionAdapter.getJsonAdapter(CompressionAdapter.java:166)
    at org.janelia.saalfeldlab.n5.AbstractGsonReader.(AbstractGsonReader.java:58)
    at org.janelia.saalfeldlab.n5.N5FSReader.(N5FSReader.java:116)
    at org.janelia.saalfeldlab.n5.N5FSReader.(N5FSReader.java:136)
    at org.janelia.saalfeldlab.N5Factory.createN5FS(N5Factory.java:259)
    at org.janelia.saalfeldlab.N5Factory.createN5(N5Factory.java:207)
    at org.janelia.saalfeldlab.N5Factory.createN5Reader(N5Factory.java:186)
    at org.janelia.saalfeldlab.View.call(View.java:281)
    at org.janelia.saalfeldlab.View.call(View.java:175)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1853)
    at picocli.CommandLine.access$1100(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2255)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2249)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2213)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2080)
    at picocli.CommandLine.execute(CommandLine.java:1978)
    at org.janelia.saalfeldlab.View.main(View.java:514)

Not sure if it is only needed if compression is used when the N5 data is saved. But thought I would report it nonetheless.

@bogovicj
Copy link
Contributor

thanks for reporting @AdvancedImagingUTSW

@AdvancedImagingUTSW
Copy link
Author

I definitely meant to post this to the n5-utils repository. I apologize, our coffee isn't as good as Janelia's. Mark mentioned that it would be helpful to have a have a full traceback. To my knowledge, my .bashrc profile has nothing related to the execution of this program.

Shell input calls a program named 2022-04-29-n5view.sh. Within this shell script, it simply calls the n5-view compiled program with the necessary flags.

n5-view -i /archive/MIL/dean/2022-04-24-big-stitcher-spark-test/fusion-test.n5/ -d /ch488/s0

Shell output.

[kdean@NucleusC053 ~]$ '/archive/MIL/dean/shell-scripts/2022-04-29-n5view' 
Compression 'org.janelia.saalfeldlab.n5.blosc.BloscCompression' could not be registered because:
java.lang.UnsatisfiedLinkError: Unable to load library 'blosc': Native library (linux-x86-64/libblosc.so) not found in resource path ([file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-utils/0.0.6-SNAPSHOT/n5-utils-0.0.6-SNAPSHOT.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2/5.10.0/imglib2-5.10.0.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5/2.4.0/n5-2.4.0.jar, file:/home2/kdean/.m2/repository/org/tukaani/xz/1.8/xz-1.8.jar, file:/home2/kdean/.m2/repository/org/lz4/lz4-java/1.7.1/lz4-java-1.7.1.jar, file:/home2/kdean/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar, file:/home2/kdean/.m2/repository/org/scijava/scijava-common/2.83.3/scijava-common-2.83.3.jar, file:/home2/kdean/.m2/repository/org/scijava/parsington/2.0.0/parsington-2.0.0.jar, file:/home2/kdean/.m2/repository/org/bushe/eventbus/1.4/eventbus-1.4.jar, file:/home2/kdean/.m2/repository/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-imglib2/3.5.1/n5-imglib2-3.5.1.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-label-multisets/0.9.0/imglib2-label-multisets-0.9.0.jar, file:/home2/kdean/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-realtransform/3.0.0/imglib2-realtransform-3.0.0.jar, file:/home2/kdean/.m2/repository/gov/nist/math/jama/1.0.3/jama-1.0.3.jar, file:/home2/kdean/.m2/repository/jitk/jitk-tps/3.0.1/jitk-tps-3.0.1.jar, file:/home2/kdean/.m2/repository/com/googlecode/efficient-java-matrix-library/ejml/0.24/ejml-0.24.jar, file:/home2/kdean/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar, file:/home2/kdean/.m2/repository/sc/fiji/bigdataviewer-vistools/1.0.0-beta-20/bigdataviewer-vistools-1.0.0-beta-20.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-ui/2.0.1/imglib2-ui-2.0.1.jar, file:/home2/kdean/.m2/repository/org/scijava/ui-behaviour/2.0.1/ui-behaviour-2.0.1.jar, file:/home2/kdean/.m2/repository/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-cache/1.0.0-beta-13/imglib2-cache-1.0.0-beta-13.jar, file:/home2/kdean/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.4.0/caffeine-2.4.0.jar, file:/home2/kdean/.m2/repository/junit/junit/4.13/junit-4.13.jar, file:/home2/kdean/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-hdf5/1.2.0/n5-hdf5-1.2.0.jar, file:/home2/kdean/.m2/repository/cisd/jhdf5/14.12.6/jhdf5-14.12.6.jar, file:/home2/kdean/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar, file:/home2/kdean/.m2/repository/commons-io/commons-io/2.7/commons-io-2.7.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-aws-s3/3.2.0/n5-aws-s3-3.2.0.jar, file:/home2/kdean/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.796/aws-java-sdk-s3-1.11.796.jar, file:/home2/kdean/.m2/repository/com/amazonaws/aws-java-sdk-kms/1.11.796/aws-java-sdk-kms-1.11.796.jar, file:/home2/kdean/.m2/repository/com/amazonaws/aws-java-sdk-core/1.11.796/aws-java-sdk-core-1.11.796.jar, file:/home2/kdean/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar, file:/home2/kdean/.m2/repository/org/apache/httpcomponents/httpclient/4.5.12/httpclient-4.5.12.jar, file:/home2/kdean/.m2/repository/commons-codec/commons-codec/1.14/commons-codec-1.14.jar, file:/home2/kdean/.m2/repository/software/amazon/ion/ion-java/1.0.2/ion-java-1.0.2.jar, file:/home2/kdean/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.6.7/jackson-dataformat-cbor-2.6.7.jar, file:/home2/kdean/.m2/repository/joda-time/joda-time/2.10.6/joda-time-2.10.6.jar, file:/home2/kdean/.m2/repository/com/amazonaws/jmespath-java/1.11.796/jmespath-java-1.11.796.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-google-cloud/3.2.2/n5-google-cloud-3.2.2.jar, file:/home2/kdean/.m2/repository/com/google/cloud/google-cloud-storage/1.108.0/google-cloud-storage-1.108.0.jar, file:/home2/kdean/.m2/repository/com/google/guava/guava/21.0/guava-21.0.jar, file:/home2/kdean/.m2/repository/com/google/http-client/google-http-client/1.35.0/google-http-client-1.35.0.jar, file:/home2/kdean/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar, file:/home2/kdean/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar, file:/home2/kdean/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar, file:/home2/kdean/.m2/repository/io/opencensus/opencensus-contrib-http-util/0.24.0/opencensus-contrib-http-util-0.24.0.jar, file:/home2/kdean/.m2/repository/com/google/http-client/google-http-client-jackson2/1.35.0/google-http-client-jackson2-1.35.0.jar, file:/home2/kdean/.m2/repository/com/google/api-client/google-api-client/1.30.9/google-api-client-1.30.9.jar, file:/home2/kdean/.m2/repository/com/google/oauth-client/google-oauth-client/1.30.5/google-oauth-client-1.30.5.jar, file:/home2/kdean/.m2/repository/com/google/apis/google-api-services-storage/v1-rev20200326-1.30.9/google-api-services-storage-v1-rev20200326-1.30.9.jar, file:/home2/kdean/.m2/repository/com/google/cloud/google-cloud-core/1.93.4/google-cloud-core-1.93.4.jar, file:/home2/kdean/.m2/repository/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar, file:/home2/kdean/.m2/repository/com/google/api/grpc/proto-google-common-protos/1.17.0/proto-google-common-protos-1.17.0.jar, file:/home2/kdean/.m2/repository/com/google/cloud/google-cloud-core-http/1.93.4/google-cloud-core-http-1.93.4.jar, file:/home2/kdean/.m2/repository/com/google/http-client/google-http-client-appengine/1.34.2/google-http-client-appengine-1.34.2.jar, file:/home2/kdean/.m2/repository/com/google/api/gax-httpjson/0.73.0/gax-httpjson-0.73.0.jar, file:/home2/kdean/.m2/repository/com/google/api/gax/1.56.0/gax-1.56.0.jar, file:/home2/kdean/.m2/repository/com/google/auth/google-auth-library-credentials/0.20.0/google-auth-library-credentials-0.20.0.jar, file:/home2/kdean/.m2/repository/com/google/auth/google-auth-library-oauth2-http/0.20.0/google-auth-library-oauth2-http-0.20.0.jar, file:/home2/kdean/.m2/repository/com/google/api/api-common/1.9.0/api-common-1.9.0.jar, file:/home2/kdean/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar, file:/home2/kdean/.m2/repository/io/opencensus/opencensus-api/0.24.0/opencensus-api-0.24.0.jar, file:/home2/kdean/.m2/repository/io/grpc/grpc-context/1.22.1/grpc-context-1.22.1.jar, file:/home2/kdean/.m2/repository/com/google/api/grpc/proto-google-iam-v1/0.13.0/proto-google-iam-v1-0.13.0.jar, file:/home2/kdean/.m2/repository/com/google/protobuf/protobuf-java/3.11.4/protobuf-java-3.11.4.jar, file:/home2/kdean/.m2/repository/com/google/protobuf/protobuf-java-util/3.11.4/protobuf-java-util-3.11.4.jar, file:/home2/kdean/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar, file:/home2/kdean/.m2/repository/org/threeten/threetenbp/1.4.4/threetenbp-1.4.4.jar, file:/home2/kdean/.m2/repository/com/google/cloud/google-cloud-resourcemanager/0.117.2-alpha/google-cloud-resourcemanager-0.117.2-alpha.jar, file:/home2/kdean/.m2/repository/com/google/apis/google-api-services-cloudresourcemanager/v1-rev20200210-1.30.9/google-api-services-cloudresourcemanager-v1-rev20200210-1.30.9.jar, file:/home2/kdean/.m2/repository/sc/fiji/bigdataviewer-core/9.0.6/bigdataviewer-core-9.0.6.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-algorithm/0.11.2/imglib2-algorithm-0.11.2.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-roi/0.10.3/imglib2-roi-0.10.3.jar, file:/home2/kdean/.m2/repository/org/ojalgo/ojalgo/45.1.1/ojalgo-45.1.1.jar, file:/home2/kdean/.m2/repository/sc/fiji/spim_data/2.2.4/spim_data-2.2.4.jar, file:/home2/kdean/.m2/repository/org/jdom/jdom2/2.0.6/jdom2-2.0.6.jar, file:/home2/kdean/.m2/repository/org/scijava/scijava-listeners/1.0.0-beta-3/scijava-listeners-1.0.0-beta-3.jar, file:/home2/kdean/.m2/repository/com/miglayout/miglayout-swing/5.2/miglayout-swing-5.2.jar, file:/home2/kdean/.m2/repository/com/miglayout/miglayout-core/5.2/miglayout-core-5.2.jar, file:/home2/kdean/.m2/repository/info/picocli/picocli/4.3.2/picocli-4.3.2.jar, file:/home2/kdean/.m2/repository/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-blosc/1.1.0/n5-blosc-1.1.0.jar, file:/home2/kdean/.m2/repository/org/lasersonlab/jblosc/1.0.1/jblosc-1.0.1.jar, file:/home2/kdean/.m2/repository/net/java/dev/jna/jna/4.5.2/jna-4.5.2.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-zarr/0.0.6/n5-zarr-0.0.6.jar, file:/home2/kdean/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0.jar, file:/home2/kdean/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.11.0/jackson-annotations-2.11.0.jar, file:/home2/kdean/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.11.0/jackson-core-2.11.0.jar, file:/home2/kdean/.m2/repository/net/imagej/ij/1.53c/ij-1.53c.jar, file:/home2/kdean/.m2/repository/org/janelia/saalfeldlab/n5-jpeg/0.0.1-beta1/n5-jpeg-0.0.1-beta1.jar, file:/home2/kdean/.m2/repository/net/imglib2/imglib2-ij/2.0.0-beta-46/imglib2-ij-2.0.0-beta-46.jar, file:/home2/kdean/.m2/repository/net/imagej/imagej-common/0.33.0/imagej-common-0.33.0.jar, file:/home2/kdean/.m2/repository/org/scijava/scijava-table/0.6.1/scijava-table-0.6.1.jar, file:/home2/kdean/.m2/repository/org/scijava/scijava-optional/1.0.0/scijava-optional-1.0.0.jar, file:/home2/kdean/.m2/repository/edu/ucar/udunits/4.3.18/udunits-4.3.18.jar])
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:303)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427)
	at com.sun.jna.Native.register(Native.java:1647)
	at com.sun.jna.Native.register(Native.java:1360)
	at org.blosc.IBloscDll.<clinit>(IBloscDll.java:15)
	at org.blosc.JBlosc.init(JBlosc.java:30)
	at org.blosc.JBlosc.<init>(JBlosc.java:24)
	at org.janelia.saalfeldlab.n5.blosc.BloscCompression.<clinit>(BloscCompression.java:70)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at org.janelia.saalfeldlab.n5.CompressionAdapter.update(CompressionAdapter.java:82)
	at org.janelia.saalfeldlab.n5.CompressionAdapter.getJsonAdapter(CompressionAdapter.java:166)
	at org.janelia.saalfeldlab.n5.AbstractGsonReader.<init>(AbstractGsonReader.java:58)
	at org.janelia.saalfeldlab.n5.N5FSReader.<init>(N5FSReader.java:116)
	at org.janelia.saalfeldlab.n5.N5FSReader.<init>(N5FSReader.java:136)
	at org.janelia.saalfeldlab.N5Factory.createN5FS(N5Factory.java:259)
	at org.janelia.saalfeldlab.N5Factory.createN5(N5Factory.java:207)
	at org.janelia.saalfeldlab.N5Factory.createN5Reader(N5Factory.java:186)
	at org.janelia.saalfeldlab.View.call(View.java:281)
	at org.janelia.saalfeldlab.View.call(View.java:175)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1853)
	at picocli.CommandLine.access$1100(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2255)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2249)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2213)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2080)
	at picocli.CommandLine.execute(CommandLine.java:1978)
	at org.janelia.saalfeldlab.View.main(View.java:514)
N5FSReader[basePath=/archive/MIL/dean/2022-04-24-big-stitcher-spark-test/fusion-test.n5/] : /ch488/s0, [1.0, 1.0, 1.0], [0.0, 255.0], [0.0, 0.0, 0.0], Num axes: 3
axes permutation: [0, 1, 2] -> [0, 1, 2]
/ch488/s0 3d-affine: (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0)
/home2/kdean/bin/n5-view: line 10: -XX:+UseConcMarkSweepGC: command not found

Thank you,
Kevin

@mkitti
Copy link

mkitti commented Apr 30, 2022

Thanks Kevin, I see it now.

@mkitti
Copy link

mkitti commented Jun 2, 2022

This is compounded by several issues:

  1. The libblosc.so native library is usually distributed by FIJI in Fiji.app/lib/linux64/libblosc.so
  2. Linux distributions typically package this as libblosc.so.1
  3. Sometimes the development packages (e.g. libblosc-dev) maybe provide "libblosc.so"

In the near term, users can can extract libblosc.so from the Fiji.app folder and add it to the library load path (e.g. LD_LIBRARY_PATH). Please consult your local system administrator on how to best do this.

Another option may be to install a prepared libblosc, blosc, or c-blosc package or their dev companion packages for your system, and symlink libblosc.so.1 to libblosc.so.

A more intensive option involves building c-blosc from scratch. See the README at https://github.com/Blosc/c-blosc

In the long term, Fiji.app and the relevant Saalfeld Lab packages should probably link against libblosc.so.1 rather than libblosc.so so that the native library could be provided by the Linux system if not provided by FIJI.

cc: @ctrueden

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