You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by "Paulini, Matthew CTR USAF AFMC AFRL/RISA" <ma...@rl.af.mil> on 2012/06/06 21:18:46 UTC

TIKA-198: Illegal IOException... MP4

Hello,
 
****Background****
I recently upgraded from tika-app-0.10.jar to tika-app-1.1.jar. Predominantly, I run Linux (currently, Ubuntu 12.04 x64) but the application must also run on 32-bit Linux (Ubuntu 12.04) and Windows 32 and 64 (currently, Windows 7); not a big deal, it's a Java application. With the recent upgrade to tika-app-1.1.jar, I noticed that the Content-type returned to me from Tika, when passing it a byte array of an .mp4 video file on Linux, was "application/mp4." I used to expect "video/quicktime" from tika-app-0.10.jar but that's an easy enough change for me to handle. However, I am having an issue on the Windows boxes.
 
****Issue****
When using tika-app-0.10.jar, I receive "video/quicktime" when passing the .mp4 byte array. But, tika-app-1.1.jar is throwing an exception (TIKA-198: Illegal IOException from org.apache.tika.parser.mp4.MP4Parser@8491b8) from the MP4Parser. This only occurs on the Windows boxes; I get "application/mp4" on the Linux boxes. I am wondering if there is a bug or if there is something going wrong that I need to change on my end.
 
****Stack Trace****
 
13:55:03,496 ERROR [TikaFormatDeterminationProcessor] Failed to extract format information from resource!
org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from org.apache.tika.parser.mp4.MP4Parser@8491b8
        at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:248)
        at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
        at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
        at org.apache.tika.Tika.parseToString(Tika.java:380)
        at TikaFormatDeterminationProcessor.extractFormatInformation(TikaFormatDeterminationProcessor.java:114)
        at TikaFormatDeterminationProcessor.executeFormatDetermination(TikaFormatDeterminationProcessor.java:78)
        at TikaFormatDeterminationProcessorTest.testVideoExecuteFormatDetermination(TikaFormatDeterminationProcessorTest.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
        at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
        at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
        at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
        at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
        at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
        at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
        at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
        at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
        at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
        at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
        at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
        at $Proxy0.invoke(Unknown Source)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.io.IOException: Could not delete temporary file C:\AppData\Local\Temp\apache-tika-4173856359022912943.tmp
        at org.apache.tika.io.TemporaryResources$1.close(TemporaryResources.java:70)
        at org.apache.tika.io.TemporaryResources.close(TemporaryResources.java:121)
        at org.apache.tika.io.TikaInputStream.close(TikaInputStream.java:637)
        at org.apache.tika.parser.mp4.MP4Parser.parse(MP4Parser.java:123)
        at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
        ... 34 more
Expected Format ::: application/mp4
Format Determined by Tika ::: application/octet-stream
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.857 sec <<< FAILURE!
 
 
Thank you,
Matthew

Re: TIKA-198: Illegal IOException... MP4

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
That is great to hear!

Cheers,
Chris

On Jun 7, 2012, at 4:35 AM, Paulini, Matthew CTR USAF AFMC AFRL/RISA wrote:

> Thanks, Nick. I swapped in tika-app-1.2-20120528.050306-57.jar and the issue seems to be resolved. The project is building and testing correctly on Ubuntu 12.04 x32 and x64 as well as Windows 7 x32 and x64.
> 
> From: Nick Burch [mailto:nick.burch@alfresco.com]
> Sent: Wed 6/6/2012 3:39 PM
> To: user@tika.apache.org
> Subject: Re: TIKA-198: Illegal IOException... MP4
> 
> On Wed, 6 Jun 2012, Paulini, Matthew CTR USAF AFMC AFRL/RISA wrote:
> > When using tika-app-0.10.jar, I receive "video/quicktime" when passing
> > the .mp4 byte array. But, tika-app-1.1.jar is throwing an exception
> > (TIKA-198: Illegal IOException from
> > org.apache.tika.parser.mp4.MP4Parser@8491b8) from the MP4Parser. This
> > only occurs on the Windows boxes; I get "application/mp4" on the Linux
> > boxes. I am wondering if there is a bug or if there is something going
> > wrong that I need to change on my end.
> 
> Can you try with a recent nightly build / svn checkout? IIRC the mp4
> related fixes went in after Tika 1.1, so it might well be fixed already
> 
> Nick
> 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


RE: TIKA-198: Illegal IOException... MP4

Posted by "Paulini, Matthew CTR USAF AFMC AFRL/RISA" <ma...@rl.af.mil>.
Thanks, Nick. I swapped in tika-app-1.2-20120528.050306-57.jar and the issue seems to be resolved. The project is building and testing correctly on Ubuntu 12.04 x32 and x64 as well as Windows 7 x32 and x64.

________________________________

From: Nick Burch [mailto:nick.burch@alfresco.com]
Sent: Wed 6/6/2012 3:39 PM
To: user@tika.apache.org
Subject: Re: TIKA-198: Illegal IOException... MP4



On Wed, 6 Jun 2012, Paulini, Matthew CTR USAF AFMC AFRL/RISA wrote:
> When using tika-app-0.10.jar, I receive "video/quicktime" when passing
> the .mp4 byte array. But, tika-app-1.1.jar is throwing an exception
> (TIKA-198: Illegal IOException from
> org.apache.tika.parser.mp4.MP4Parser@8491b8) from the MP4Parser. This
> only occurs on the Windows boxes; I get "application/mp4" on the Linux
> boxes. I am wondering if there is a bug or if there is something going
> wrong that I need to change on my end.

Can you try with a recent nightly build / svn checkout? IIRC the mp4
related fixes went in after Tika 1.1, so it might well be fixed already

Nick



Re: TIKA-198: Illegal IOException... MP4

Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 6 Jun 2012, Paulini, Matthew CTR USAF AFMC AFRL/RISA wrote:
> When using tika-app-0.10.jar, I receive "video/quicktime" when passing 
> the .mp4 byte array. But, tika-app-1.1.jar is throwing an exception 
> (TIKA-198: Illegal IOException from 
> org.apache.tika.parser.mp4.MP4Parser@8491b8) from the MP4Parser. This 
> only occurs on the Windows boxes; I get "application/mp4" on the Linux 
> boxes. I am wondering if there is a bug or if there is something going 
> wrong that I need to change on my end.

Can you try with a recent nightly build / svn checkout? IIRC the mp4 
related fixes went in after Tika 1.1, so it might well be fixed already

Nick