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

recent java 17 not supported #230

Closed
splaisan opened this issue Mar 13, 2023 · 7 comments
Closed

recent java 17 not supported #230

splaisan opened this issue Mar 13, 2023 · 7 comments

Comments

@splaisan
Copy link

Hi,

I think this is a known issue, but I do not find an issue page for it.
I recently updated my java to run other apps and it does not run your tool and dies with:

$ java ${javaopts} -jar $BIOTOOLS/DISCVRSeq/DISCVRseq.jar VariantQC --help

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:304)
        at org.broadinstitute.hellbender.Main.setupConfigAndExtractProgram(Main.java:180)
        at org.broadinstitute.hellbender.Main.mainEntry(Main.java:202)
        at com.github.discvrseq.Main.main(Main.java:50)
Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
        at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
        at org.broadinstitute.barclay.argparser.ClassFinder.<clinit>(ClassFinder.java:29)
        ... 4 more
$ java --version

openjdk 17.0.6 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Ubuntu-0ubuntu120.04.1)
OpenJDK 64-Bit Server VM (build 17.0.6+10-Ubuntu-0ubuntu120.04.1, mixed mode, sharing)

Your docker version runs as well as your latest version in a conda env with java8 installed.
Do you have plans to update your code so it works under the current java?

Thanks

@bbimber
Copy link
Contributor

bbimber commented Mar 13, 2023

Yes, that's right. DISCVR-seq is dependent on GATK4, and therefore we need to follow what they support. GATK is working on supporting newer java versions, see here: broadinstitute/gatk#8035 (comment). When they release a version compatible with newer java I expect to update DISCVR-seq accordingly.

@splaisan
Copy link
Author

perfect, thanks for the info
I can run GATK but probably they embeded java in it so there I do not see issues.
Thanks for the great tool

@bbimber
Copy link
Contributor

bbimber commented Mar 29, 2023

@splaisan: GATK updated to a version that supports newer java, and I just updated DISCVR-seq to use this. I believe the latest version should support modern java versions: https://github.com/BimberLab/DISCVRSeq/releases/tag/1.3.28

@splaisan
Copy link
Author

Thanks @bbimber for this new version
I downloaded the java and tried it but it does not work with my java 17
I attach the error message as I cannot really make something of it
If I can further troubleshoot, please let me know

Best
S

(base) u0002316@gbw-s-pacbio01:/opt/biotools/DISCVRSeq $ java -version
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Ubuntu-0ubuntu120.04.1)
OpenJDK 64-Bit Server VM (build 17.0.6+10-Ubuntu-0ubuntu120.04.1, mixed mode, sharing)

(base) u0002316@gbw-s-pacbio01:/opt/biotools/DISCVRSeq $ java -jar ./DISCVRSeq-1.3.28.jar
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:304)
	at org.broadinstitute.hellbender.Main.setupConfigAndExtractProgram(Main.java:180)
	at org.broadinstitute.hellbender.Main.mainEntry(Main.java:202)
	at com.github.discvrseq.Main.main(Main.java:50)
Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
	at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
	at org.broadinstitute.barclay.argparser.ClassFinder.<clinit>(ClassFinder.java:29)
	... 4 more

running it in a conda env with java 8 also fails while it works with the previous build but this seems normal since it was compiled for modern java.

(base) u0002316@gbw-s-pacbio01:/opt/biotools/DISCVRSeq $ conda activate java8
(java8) u0002316@gbw-s-pacbio01:/opt/biotools/DISCVRSeq $ java -version
openjdk version "1.8.0_112"
OpenJDK Runtime Environment (Zulu 8.19.0.1-linux64) (build 1.8.0_112-b16)
OpenJDK 64-Bit Server VM (Zulu 8.19.0.1-linux64) (build 25.112-b16, mixed mode)

(java8) u0002316@gbw-s-pacbio01:/opt/biotools/DISCVRSeq $ java -jar ./DISCVRSeq-1.3.28.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/github/discvrseq/Main has been compiled by a more recent version of the Java Runtime (class file version 61.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:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

previous version

(java8) u0002316@gbw-s-pacbio01:/opt/biotools/DISCVRSeq $ java -jar ./DISCVRSeq-1.3.27.jar | head
USAGE: java -jar DISCVRseq.jar <program name> [-h]

Available Programs:
--------------------------------------------------------------------------------------
Development/Pre-production Tools:                Unlike the public tools group, these tools may have have received less rigorous testing and may be under active development.
    ImmunoGenotyper                              Provides genotyping summary for complex multigenic loci, like KIR or MHC.
    PrintReadBackedHaplotypes                    Reconstructs and prints a list of distinct read-backed sequences over the supplied intervals

--------------------------------------------------------------------------------------
Public/Stable Tools:                             These tools should be rigorously validated and stable.
...

@bbimber bbimber reopened this Mar 30, 2023
@bbimber
Copy link
Contributor

bbimber commented Mar 30, 2023

@splaisan Thanks, and I see this too. I'll look into it.

@bbimber
Copy link
Contributor

bbimber commented Mar 30, 2023

@splaisan: when you have a minute, can you please try the latest JAR for 1.3.28: https://github.com/BimberLab/DISCVRSeq/releases/tag/1.3.28

@splaisan
Copy link
Author

Hi @bbimber
The new build of 1.3.28 starts from a dry run and I can get help for a couple of commands.
I did not run real commands yet but at least we do not get the startup crash for a dry run

thanks a lot for your support
I will not have time to test the command immediately but will do asap

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

2 participants