prebuilt gatk4 does not show --list on OSX HighSierra+java9

splaisansplaisan Leuven / Gent (Belgium)Member
edited January 19 in Ask the GATK team

Hi there,
Is it possible that mac and or java 9 are not happy with the gatk wrapper?
Thanks in advance
Stephane

$ gatk --list
Using GATK jar /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar
Running:
    java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=1 -jar /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar --help
Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/broadinstitute/barclay/argparser/CommandLineProgramGroup. Method lambda$static$0(Lorg/broadinstitute/barclay/argparser/CommandLineProgramGroup;Lorg/broadinstitute/barclay/argparser/CommandLineProgramGroup;)I at index 43 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
    at org.broadinstitute.barclay.argparser.CommandLineProgramGroup.<clinit>(CommandLineProgramGroup.java:19)
    at org.broadinstitute.hellbender.Main.printUsage(Main.java:366)
    at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:326)
    at org.broadinstitute.hellbender.Main.setupConfigAndExtractProgram(Main.java:172)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:192)
    at org.broadinstitute.hellbender.Main.main(Main.java:275)

$ java --version
java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

$ picard: Version: 2.17.4-SNAPSHOT
Tagged:

Best Answer

Answers

  • splaisansplaisan Leuven / Gent (Belgium)Member

    And all works fine on my ubuntu server with the same gatk.zip bundle.

    $ java -version
    openjdk version "1.8.0_151"
    OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
    OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
    
  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @splaisan
    Hi Stephane,

    I suspect the issue is with JAVA 9. Can you confirm your original post works if you change to JAVA 8?

    Thanks,
    Sheila

  • splaisansplaisan Leuven / Gent (Belgium)Member

    I tried but did not succeed yet, could you java-help me please ;-)

    failing under 9

    $ gatk --list
    Using GATK jar /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar
    Running:
        java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=1 -jar /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar --help
    Exception in thread "main" java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/broadinstitute/barclay/argparser/CommandLineProgramGroup. Method lambda$static$0(Lorg/broadinstitute/barclay/argparser/CommandLineProgramGroup;Lorg/broadinstitute/barclay/argparser/CommandLineProgramGroup;)I at index 43 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
        at org.broadinstitute.barclay.argparser.CommandLineProgramGroup.(CommandLineProgramGroup.java:19)
        at org.broadinstitute.hellbender.Main.printUsage(Main.java:366)
        at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:326)
        at org.broadinstitute.hellbender.Main.setupConfigAndExtractProgram(Main.java:172)
        at org.broadinstitute.hellbender.Main.mainEntry(Main.java:192)
        at org.broadinstitute.hellbender.Main.main(Main.java:275)
    

    available java versions

    $ /usr/libexec/java_home -V
    Matching Java Virtual Machines (3):
        9.0.1, x86_64:  "Java SE 9.0.1" /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
        1.6.0_65-b14-468, x86_64:   "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
        1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    

    current version

    $ java -version
    java version "9.0.1"
    Java(TM) SE Runtime Environment (build 9.0.1+11)
    Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
    

    changing to 1.6 and testing

    $ export JAVA_HOME=`/usr/libexec/java_home -v 1.6`
    
    # testing change
    $ java -version
    java version "1.6.0_65"
    Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
    Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
    

    trying again gatk --list

    $ gatk --list
    Using GATK jar /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar
    Running:
        java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=1 -jar /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar --help
    Invalid or corrupt jarfile /opt/biotools/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar
    

    ??

  • splaisansplaisan Leuven / Gent (Belgium)Member
    edited February 12

    Hi Sheila,

    This is not a cluster but only my personal macbook pro with high sierra installed. My OSX java is v9 due to the Apple system installs.

    I now installed 1.8 as you advised and manually switched to 1.8 and --list indeed now works (thanks for that!).

    Will future versions support v9 to be up-to-date with the OSX installed java build?

    Best
    Stephane

  • Hi,
    I also have same problem. My system is Linux, and java is "java version "1.8.0_45". I download the gatk-4.0.1.2.zip and unzip it, then I run ./gatk --list
    ./gatk --list
    Using GATK jar /hwfssz1/ST_META/AP/zhaohailong/install.software/gatk-4.0.1.2/gatk-package-4.0.1.2-local.jar
    Running:
    java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=1 -jar /hwfssz1/ST_META/AP/zhaohailong/install.software/gatk-4.0.1.2/gatk-package-4.0.1.2-local.jar --help
    Error: Invalid or corrupt jarfile /hwfssz1/ST_META/AP/zhaohailong/install.software/gatk-4.0.1.2/gatk-package-4.0.1.2-local.jar

    Please help me, how can I solve it?

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @splaisan
    Hi Stephane,

    I am sure the team will upgrade to Java 9 at some point, but it does not look like there are any immediate plans for it. Also, this article may be useful as well :smile:

    -Sheila

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @zhaoxvwahaha
    Hi,

    Have a look at the README.

    -Sheila

Sign In or Register to comment.