java.lang.ClassCastException: org.archive.io.warc.WARCReaderFactory$UncompressedWARCReader cannot be cast to org.archive.io.warc.v10.WARCReader

JIRA | Michael Stack | 10 years ago
  1. 0

    The below was reported by Olaf Freyer up on the mailing list: With the release candidate I seem to be unable to use the v10 WARCReader via the console (not tested if it would fail when using via java, too). Here is how I'm used to use the WARCReader (updated to new package structure) My warcreader shell script basically contains: FOREGROUND='true' CLASS_MAIN='org.archive.io.warc.v10.WARCReader' JMX_OFF='off' $HERITRIX_HOME/bin/heritrix Now I do call: sh warcreader -f dump myWARC.warc Here is what I get: java.lang.ClassCastException: org.archive.io.warc.WARCReaderFactory$UncompressedWARCReader cannot be cast to org.archive.io.warc.v10.WARCReader at org.archive.io.warc.v10.WARCReaderFactory.get(WARCReaderFactory.java:61) at org.archive.io.warc.v10.WARCReader.main(WARCReader.java:298) Also note that I seem to be unable to use the "dump" option of the WARCReader of heritrix-1.10.2, too. Even though it at least starts up I get the following error: Exception processing myWARC.warc: java.io.IOException: Unexpected character a(Expecting d) java.lang.RuntimeException: java.io.IOException: Unexpected character a(Expecting d) at org.archive.io.ArchiveReader$ArchiveRecordIterator.hasNext(ArchiveReader.java:462) at org.archive.io.warc.WARCReader.dump(WARCReader.java:104) at org.archive.io.ArchiveReader.output(ArchiveReader.java:627) at org.archive.io.warc.WARCReader.output(WARCReader.java:156) at org.archive.io.warc.WARCReader.main(WARCReader.java:300) Caused by: java.io.IOException: Unexpected character a(Expecting d) at org.archive.io.warc.WARCReader.readExpectedChar(WARCReader.java:81) at org.archive.io.warc.WARCReader.gotoEOR(WARCReader.java:71) at org.archive.io.ArchiveReader.cleanupCurrentRecord(ArchiveReader.java:190) at org.archive.io.ArchiveReader$ArchiveRecordIterator.hasNext(ArchiveReader.java:460) ... 4 more Thanks in advance for any help/advice Olaf freyer

    JIRA | 10 years ago | Michael Stack
    java.lang.ClassCastException: org.archive.io.warc.WARCReaderFactory$UncompressedWARCReader cannot be cast to org.archive.io.warc.v10.WARCReader
  2. 0

    Memcached Java客户端2.6.1发布 - 编程语言 - ITeye资讯

    iteye.com | 1 year ago
    java.lang.ClassCastException: cannot be cast to
  3. 0

    Scala 2.11.5 and Squeryl?

    Google Groups | 2 years ago | Clint Gilbert
    java.lang.ClassCastException: scala.None$ cannot be cast to
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    adam2vcf

    Google Groups | 8 months ago | someya sayeh
    java.lang.ClassCastException: org.bdgenomics.formats.avro.Fragment cannot be cast to
  6. 0

    cannot be cast to javax.servlet.Filter | Oracle Community

    oracle.com | 8 months ago
    java.lang.ClassCastException: cannot be cast to javax.servlet.Filter

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.archive.io.warc.WARCReaderFactory$UncompressedWARCReader cannot be cast to org.archive.io.warc.v10.WARCReader

      at org.archive.io.warc.v10.WARCReaderFactory.get()
    2. org.archive.io
      WARCReader.main
      1. org.archive.io.warc.v10.WARCReaderFactory.get(WARCReaderFactory.java:61)
      2. org.archive.io.warc.v10.WARCReader.main(WARCReader.java:298)
      2 frames