java.lang.RuntimeException: java.io.IOException: Unexpected character a(Expecting d)

JIRA | Michael Stack | 10 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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.RuntimeException: java.io.IOException: Unexpected character a(Expecting d)

    Root Cause Analysis

    1. java.io.IOException

      Unexpected character a(Expecting d)

      at org.archive.io.warc.WARCReader.readExpectedChar()
    2. webarchive-commons
      WARCReader.main
      1. org.archive.io.warc.WARCReader.readExpectedChar(WARCReader.java:81)
      2. org.archive.io.warc.WARCReader.gotoEOR(WARCReader.java:71)
      3. org.archive.io.ArchiveReader.cleanupCurrentRecord(ArchiveReader.java:190)
      4. org.archive.io.ArchiveReader$ArchiveRecordIterator.hasNext(ArchiveReader.java:460)
      5. org.archive.io.warc.WARCReader.dump(WARCReader.java:104)
      6. org.archive.io.ArchiveReader.output(ArchiveReader.java:627)
      7. org.archive.io.warc.WARCReader.output(WARCReader.java:156)
      8. org.archive.io.warc.WARCReader.main(WARCReader.java:300)
      8 frames