enasequence / cramtools

CRAM format specification and java API for read data.
http://www.ebi.ac.uk/ena/about/cram_toolkit
Apache License 2.0
58 stars 21 forks source link

NoClassDefFoundError in 2.1 #10

Closed boboppie closed 10 years ago

boboppie commented 10 years ago

Hi, I got an exception when running following command:

$ java -cp cramtools-2.1.jar net.sf.picard.sam.ValidateSamFile
Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/samtools/util/CollectionUtil$MultiMap
        at net.sf.picard.cmdline.CommandLineParser.<init>(CommandLineParser.java:178)
        at net.sf.picard.cmdline.CommandLineParser.<init>(CommandLineParser.java:203)
        at net.sf.picard.cmdline.CommandLineProgram.parseArgs(CommandLineProgram.java:232)
        at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:124)
        at net.sf.picard.sam.ValidateSamFile.main(ValidateSamFile.java:100)
Caused by: java.lang.ClassNotFoundException: net.sf.samtools.util.CollectionUtil$MultiMap
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 5 more
vadimzalunin commented 10 years ago

Looks like a build issue. I'll push an updated jar tomorrow.

vadimzalunin commented 10 years ago

fixed

boboppie commented 10 years ago

However, now I have a different exception:

[Tue Feb 25 13:28:38 GMT 2014] net.sf.picard.sam.ViewSam INPUT=LP6007626p-DNA_A.bam.cram   ALIGNMENT_STATUS=All PF_STATUS=All VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
Exception in thread "main" java.lang.NoSuchFieldError: TRY_USE_INTEL_DEFLATER
        at net.sf.samtools.util.zip.DeflaterFactory.<clinit>(DeflaterFactory.java:50)
        at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:166)
        at net.sf.picard.sam.ViewSam.main(ViewSam.java:62)

[Tue Feb 25 13:28:55 GMT 2014] net.sf.picard.sam.ValidateSamFile INPUT=LP6007626p-DNA_A.bam IGNORE=[INVALID_TAG_NM] REFERENCE_SEQUENCE=genome.fa    MODE=VERBOSE MAX_OUTPUT=100 IGNORE_WARNINGS=false VALIDATE_INDEX=true IS_BISULFITE_SEQUENCED=false MAX_OPEN_TEMP_FILES=8000 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
Exception in thread "main" java.lang.NoSuchFieldError: TRY_USE_INTEL_DEFLATER
        at net.sf.samtools.util.zip.DeflaterFactory.<clinit>(DeflaterFactory.java:50)
        at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:166)
        at net.sf.picard.sam.ValidateSamFile.main(ValidateSamFile.java:100)
vadimzalunin commented 10 years ago

Confirmed. The native intel compression support has been added in picard 104. Unfortunately the cypher library has been built against an earlier version, which makes them incompatible. I have rolled the picard dependency back to the 103 version to avoid this for now. A fresh cypher library build should be available in a couple of weeks. Then we'll upgrade the picard dependency to the latest release version. The new build should be available in an hour or so if the tests pass.

vadimzalunin commented 10 years ago

Pushed a freshly built jar, Validation and viewing seems to work.