broadinstitute/picard

Picard 2.26.5 - WARNING: sun.reflect.Reflection.getCallerClass is not supported.

blajoie opened this issue · 2 comments

[ec2-user@ip-10-5-18-111 ~]$ java --version
openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment Corretto-11.0.13.8.1 (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.13.8.1 (build 11.0.13+8-LTS, mixed mode)

Trying to run the latest picard shows the following error.
Going back one version works fine.

[ec2-user@ip-10-5-18-111 ~]$ java -jar picard.jar MarkDuplicates --TAGGING_POLICY OpticalOnly -I ....
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.broadinstitute.barclay.argparser.CommandLineArgumentParser.handleArgumentAnnotation(CommandLineArgumentParser.java:705)
        at org.broadinstitute.barclay.argparser.CommandLineArgumentParser.createArgumentDefinitions(CommandLineArgumentParser.java:333)
        at org.broadinstitute.barclay.argparser.CommandLineArgumentParser.<init>(CommandLineArgumentParser.java:121)
        at picard.cmdline.CommandLineProgram.getCommandLineParser(CommandLineProgram.java:414)
        at picard.cmdline.CommandLineProgram.getCommandLineParserForArgs(CommandLineProgram.java:400)
        at picard.cmdline.CommandLineProgram.parseArgs(CommandLineProgram.java:348)
        at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:223)
        at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103)
        at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)
Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
        at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:576)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:601)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:588)
        at org.broadinstitute.barclay.argparser.NamedArgumentDefinition.<clinit>(NamedArgumentDefinition.java:17)
        ... 9 more

cc @emiller88

I am getting the same error message when attempting to run the LiftoverVcf tool in picard 2.26.5 with openjdk 13.0.2. I also reproduced the issue with openjdk-11.0.2 and jdk-11.0.2. However, picard 2.26.5 runs properly with openjdk-8_202.

I also confirmed that the previous version of picard (2.26.4) does not produce any error messages with the newer versions of java that I have installed (i.e. openjdk 13.0.2, openjdk-11.0.2, and jdk-11.0.2).

A fix for this has been released in Picard 2.26.6. Apologies for the error.