Attention:
The frontline support team will be unavailable to answer questions until May27th 2019. We will be back soon after. Thank you for your patience and we apologize for any inconvenience!

java.lang.IncompatibleClassChangeError GATK 4

Hi,

I hit an error with GATK 4 beta 6 using the RealignerTargetCreator - as a complete java newbie it's quite incomprehensible to me. I'm running (oracle) java 9.0.1(and thus GATK 3 RealignerTargetCreator isn't working for me either :# ).

Here is the command I ran:

gatk-launch RealignerTargetCreator -R ~/data/ref/hg38.fa -I Sample1_dedup.bam -o Sample1_int.intervals

And this is the output:

Using GATK jar /usr/local/bin/gatk-4.beta.6/gatk-package-4.beta.6-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 /usr/local/bin/gatk-4.beta.6/gatk-package-4.beta.6-local.jar RealignerTargetCreator -R /home/jamie/data/ref/hg38.fa -I Sample1_dedup.bam -o Sample1_int.intervals
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:16)
    at org.broadinstitute.hellbender.Main.printUsage(Main.java:332)
    at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:305)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:156)
    at org.broadinstitute.hellbender.Main.main(Main.java:239)

Many thanks! :*

Best Answers

Answers

  • TurtlesareOKTurtlesareOK Member
    edited December 2017

    I get the same error with GATK 4 beta 5, anyone else see this?

    EDIT: didn't mean to bump this unnecessarily but didn't see a way to edit the original post!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @TurtlesareOK
    Hi,

    Can your try with Java 8? GATK4 may not be compatible with Java 9.

    -Sheila

  • TurtlesareOKTurtlesareOK Member
    edited December 2017

    Hi Sheila, thanks for your reply.

    I tried with Java 8 (Oracle and OpenJDK) and both times got this:

        Exception in thread "main" org.broadinstitute.hellbender.exceptions.UserException: 'RealignerTargetCreator' is not a valid command.
            at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:291)
            at org.broadinstitute.hellbender.Main.mainEntry(Main.java:150)
            at org.broadinstitute.hellbender.Main.main(Main.java:233)
    

    The command was the same as I ran above.

  • Ah, well that would explain it. Thanks. Does anyone know why?

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @TurtlesareOK
    Hi,

    I think this blog post will help too.

    -Sheila

  • avrajitavrajit Member

    Hi all I am also getting the same error ...

    I just download the gatk4 added the path and then

    $ gatk -Tools
    Using GATK jar /home/biouser1/tools/gatk-4.0.12.0/gatk-package-4.0.12.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=2 -jar /home/biouser1/tools/gatk-4.0.12.0/gatk-package-4.0.12.0-local.jar -Tools
    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:380)
    at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:354)
    at org.broadinstitute.hellbender.Main.setupConfigAndExtractProgram(Main.java:180)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:202)
    at org.broadinstitute.hellbender.Main.main(Main.java:289)

    I don't have much idea about java
    my java version is
    penjdk 11.0.1 2018-10-16 LTS
    OpenJDK Runtime Environment Zulu11.2+3 (build 11.0.1+13-LTS)
    OpenJDK 64-Bit Server VM Zulu11.2+3 (build 11.0.1+13-LTS, mixed mode)

    what should I do?
    gatk is not running with any option

  • SkyWarriorSkyWarrior TurkeyMember ✭✭✭

    You need java version 1.8 for GATK to run. You are using version 11 which is not compatible with GATK.

  • AdelaideRAdelaideR Unconfirmed, Member, Broadie, Moderator admin

    Thanks for contributing @SkyWarrior

    Does this resolve your question @avrajit ?

Sign In or Register to comment.