You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Alexander Chow (JIRA)" <ji...@apache.org> on 2013/04/25 18:44:15 UTC
[jira] [Created] (TIKA-1113) Parsing for OGV file results in
java.lang.ClassCastException
Alexander Chow created TIKA-1113:
------------------------------------
Summary: Parsing for OGV file results in java.lang.ClassCastException
Key: TIKA-1113
URL: https://issues.apache.org/jira/browse/TIKA-1113
Project: Tika
Issue Type: Bug
Components: metadata, parser
Affects Versions: 1.3
Reporter: Alexander Chow
When parsing any OGV file (e.g., [gizmo.ogv|http://www.808.dk/pics/video/gizmo.ogv]), log will output something like the following:
{code}
Warning - invalid checksum on page 2 of stream 3f1 (1009)
Warning - invalid checksum on page 3 of stream 3f1 (1009)
Warning - invalid checksum on page 4 of stream 3f1 (1009)
Warning - invalid checksum on page 5 of stream 3f1 (1009)
Warning - invalid checksum on page 6 of stream 3f1 (1009)
Warning - invalid checksum on page 7 of stream 3f1 (1009)
Warning - invalid checksum on page 22 of stream 3f1 (1009)
Warning - invalid checksum on page 33 of stream 3f1 (1009)
Warning - invalid checksum on page 34 of stream 3f1 (1009)
Warning - invalid checksum on page 35 of stream 3f1 (1009)
Warning - invalid checksum on page 36 of stream 3f1 (1009)
Warning - invalid checksum on page 37 of stream 3f1 (1009)
Warning - invalid checksum on page 38 of stream 3f1 (1009)
Warning - invalid checksum on page 52 of stream 3f1 (1009)
Warning - invalid checksum on page 65 of stream 3f1 (1009)
Warning - invalid checksum on page 69 of stream 3f1 (1009)
Warning - invalid checksum on page 75 of stream 3f1 (1009)
Warning - invalid checksum on page 76 of stream 3f1 (1009)
Warning - invalid checksum on page 77 of stream 3f1 (1009)
Warning - invalid checksum on page 78 of stream 3f1 (1009)
Warning - invalid checksum on page 79 of stream 3f1 (1009)
Warning - invalid checksum on page 80 of stream 3f1 (1009)
Exception in thread "main" org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.gagravarr.tika.VorbisParser@7c29e357
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:244)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
at com.test.OGVTest.main(OGVTest.java:31)
Caused by: java.lang.ClassCastException: org.gagravarr.vorbis.VorbisAudioData cannot be cast to org.gagravarr.vorbis.VorbisInfo
at org.gagravarr.vorbis.VorbisFile.<init>(VorbisFile.java:78)
at org.gagravarr.vorbis.VorbisFile.<init>(VorbisFile.java:55)
at org.gagravarr.tika.VorbisParser.parse(VorbisParser.java:58)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
... 3 more
{code}
Testcode is the following:
{code:title=OGVTest.java}
void parse(String fileName) throws Exception {
InputStream inputStream = new FileInputStream(fileName);
Metadata metadata = new Metadata();
Parser parser = new AutoDetectParser();
ParseContext parserContext = new ParseContext();
parserContext.set(Parser.class, parser);
ContentHandler contentHandler = new WriteOutContentHandler(
new DummyWriter());
parser.parse(inputStream, contentHandler, metadata, parserContext);
System.out.println(metadata);
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira