Invalid or corrupt jarfile

GreyGrey Member
edited January 23 in Ask the GATK team

When I run

./gatk --help

it seems to be working fine. However, running anything else such as

./gatk --list

produces an error:

Error: Invalid or corrupt jarfile /path/to/gatk/gatk-4.0.0.0/gatk-package-4.0.0.0-local.jar

What's going on? Sorry this might be noob question.

Answers

  • SkyWarriorSkyWarrior TurkeyMember

    Can you try to re-download the package and extract the script and the jar files into the same folder? Your download may have been interrupted therefore the file is corrupt.

  • Hi, I got the same error and realized I was working with java 1.7, whereas java 1.8 is required.

  • Hi,

    I have java 1.8 and i still get this error
    GATK jar /Users/preetisingh/Documents/gatk-4.0.1.1/gatk-package-4.0.1.1-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 /Users/preetisingh/Documents/gatk-4.0.1.1/gatk-package-4.0.1.1-local.jar --help
    Invalid or corrupt jarfile /Users/preetisingh/Documents/gatk-4.0.1.1/gatk-package-4.0.1.1-local.jar

    The terminal doesn't recognise GATK as commands. I reinstalled the package and still no avail (tried this at least 5 times). Could someone please help me.

    I'm new to GATK and have had my brain wrecked over this since last 2 weeks. Any help is much appreciated.

    Many thanks.

    Regards,

    Preeti

  • Also, the script and jar files have been extracted into the same folder (every time) and still I get the same error.

    Thanks.

    Preeti

  • Hi,

    Apologies for the constant texts. I have been able to list the files but my terminal (on Mac) still doesn't recognise GATK commands. With any GATK command I get the following error
    -bash: gatk: command not found

    I am unable to create a reference file even though I have downloaded the bundle from Broad institute ftp server. Any GATK command comes with the above mentioned error.

    ./gatk works with --help and --list but nothing else.

    Hope someone will be able to address my concerns.

    Many thanks.

    Regards,

    Preeti

  • Hi,

    I am currently having the same issue. I ensured I had the correct java version (1.8) and I downloaded directly from the GATK website. So far, ./gatk --help works but ./gatk list or any other command doesn't work.

    I have gotten the following errors:
    "-bash: ./gatk: No such file or directory"
    or
    " Error: Invalid or corrupt jarfile".

  • 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

    @preetisingh @JmeAlena @zhaoxvwahaha
    Hi everyone,

    Do you have Python 2.6 or greater installed as well? Have a look at the README for more information.

    -Sheila

  • Hi there,

    My version of python is 2.7.7.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @JmeAlena
    Hi again,

    The README did not help? Can you post exactly what you get when you type python --version and java -version in your command line? Sometimes you may have a few different versions downloaded and the version used is not the one you want.

    -Sheila

  • It appears that the cluster I was using had some issues with the java version 1.8 even though it was the version being used. I have moved a different cluster that seems to have java properly installed and it now works. Thank you!

Sign In or Register to comment.