mkirsche / Jasmine

Jasmine: SV Merging Across Samples
MIT License
175 stars 16 forks source link

Error: A JNI error has occurred, #15

Closed jigaoxiang closed 3 years ago

jigaoxiang commented 3 years ago

Dear doctor: sorry to bother you. I installed jasminesv use conda install jasminesv. but when I conduct jasmine -h ,these is an error happened as the follow showing. And I checked the version of my java and javac, they are same. I have no idea to deal with this issue, hope for your suggestion.

java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (Zulu 8.52.0.23-CA-linux64) (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (Zulu 8.52.0.23-CA-linux64) (build 25.282-b08, mixed mode)
javac -version
javac 1.8.0_282

this the error meassage:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
mkirsche commented 3 years ago

Hi,

Thanks for your interest in using Jasmine! Jasmine requires openjdk version 11 or higher, so I think there may be an error with how the dependencies were installed. Could you please verify that the java on your path is installed in the same conda environment as the jasmine executable (e.g., by running which java and which jasmine and seeing if they are in the same directory)? Alternately, you could try running conda install openjdk==11.0.9.1 to manually update the version of openjdk you have to the correct one.

I hope that helps! Melanie

jigaoxiang commented 3 years ago

Dear dr: Thank you for response! That is does the version of my java. When I install the last version of JDK, jasmine work well. thank you for this excellent tools.

best wishes!

mkirsche commented 3 years ago

Awesome, I'm happy to hear that fixed it for you! I'll go ahead and close this issue since it's working now, but please don't hesitate to reach out if you encounter any other issues!

Best, Melanie

jaesvi commented 3 years ago

Just adding here for future users that I found this error when I did not have the bioconda channel added to conda. So I install jasmine with conda install -c bioconda jasminesv and found this opendjk error, since some dependency will be then missed. If instead the conda channels are added directly with conda config --add channels bioconda and conda config --add channels conda-forge and then jasmine is installed through conda install jasminesv the error is not present.

mkirsche commented 3 years ago

Thank you for sharing that! I have updated the README's installation instructions to include the additional step of adding the channels, so hopefully that will make it easier for future users and help them avoid the JNI error.

Melanie