[ 
https://issues.apache.org/jira/browse/TIKA-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13526695#comment-13526695
 ] 

Carlos S. Zamudio commented on TIKA-1040:
-----------------------------------------

I've tried it on a library of MP4, M4V and MOV files and it fails to close the 
temporary file in all cases (they are all pretty large files). I tried it with 
a version of the 1.3SNAPSHOT that I built, but still the error appears as well. 
To test, I commenting out the IOException handler and as you would it expect it 
ran to successful completion.

I'm calling with:

FileInputStream is = new FileInputStream(myFile);
ContentHandler contenthandler = new BodyContentHandler(-1); // -1 indicates no 
limit
Metadata metadata = new Metadata();
metadata.set(Metadata.RESOURCE_NAME_KEY, file.getName());
MP4Parser parser = new MP4Parser();
ParseContext context = new ParseContext();
parser.parse(is, contenthandler, metadata, context);

I think I'll pose a question on the mailing list in case I'm not using this 
appropriately. But when I saw tyat Tika was not deleting a temporary file, it 
seemed like a continuation of a problem that was potentially solved in 1.2.  
                
> Could not delete temporary file
> -------------------------------
>
>                 Key: TIKA-1040
>                 URL: https://issues.apache.org/jira/browse/TIKA-1040
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.2
>         Environment: Windows XP 64
>            Reporter: Carlos S. Zamudio
>
> Although I found an entry that suggested this had been resolved in 1.2, I 
> continue to receive the exception below when attempting to extract metadata 
> from a video file. In my case the file type is in the Quicktime MOV format.
> org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from 
> org.apache.tika.parser.mp4.MP4Parser@4413ee
>       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 test.TikaExamples_1pt2a.testTikaMetadata(TikaExamples_1pt2a.java:223)
>       at test.TikaExamples_1pt2a.main(TikaExamples_1pt2a.java:60)
> Caused by: java.io.IOException: Could not delete temporary file 
> C:\DOCUME~1\CARLOS~1.SLA\LOCALS~1\Temp\apache-tika-1430602345143256975.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:119)
>       at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
>       ... 4 more

--
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

Reply via email to