Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

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 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 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 Member admin

    Thanks for contributing @SkyWarrior

    Does this resolve your question @avrajit ?

  • bnuketbnuket englandMember

    I am having the same problem.

    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:384)
    at org.broadinstitute.hellbender.Main.extractCommandLineProgram(Main.java:358)
    at org.broadinstitute.hellbender.Main.setupConfigAndExtractProgram(Main.java:182)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:204)
    at org.broadinstitute.hellbender.Main.main(Main.java:291)

    java -version
    java version "12.0.1" 2019-04-16
    Java(TM) SE Runtime Environment (build 12.0.1+12)
    Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

    I am having troubles on the installation of different version java for GATK. Can you help me, please...

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin
  • bnuketbnuket englandMember

    Sorry for my late response.
    It worked and the issue is solved. Thank you.

Sign In or Register to comment.