tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Burch (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-853) java.io.IOException with TikaGUI and testMP4.m4a
Date Mon, 20 Feb 2012 12:13:34 GMT

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

Nick Burch commented on TIKA-853:

If we do need to buffer it all into memory, then there are easier ways to do it than your
suggestion - TikaInputStream + IOUtils should do it nicely.

I've just been reading up on the MappedByteBuffer cleaning problems - <http://bugs.sun.com/view_bug.do?bug_id=4724038>
- and it looks like there's no easy/clean solution to this one yet

Because MP4 files can be very large (many gb large is common), I'm not sure we want to be
trying to buffer the whole file into memory just in case. 

Maybe we could try using some reflection to trigger the cleaner on the byte buffer, with careful
checks to avoid problems if it isn't sun.nio.ch backed?
> java.io.IOException with TikaGUI and testMP4.m4a
> ------------------------------------------------
>                 Key: TIKA-853
>                 URL: https://issues.apache.org/jira/browse/TIKA-853
>             Project: Tika
>          Issue Type: Bug
>          Components: gui, parser
>    Affects Versions: 1.1
>         Environment: Windows 7
>            Reporter: John Mastarone
>         Attachments: TIKA-853.patch
> Using a latest build: when attempting to drop the new testMP4.m4a file into the Tika
GUI, a TikaException / IOException occurs:  
> org.apache.tika.exception.TikaException: Failed to close temporary resources
> 	at org.apache.tika.io.TemporaryResources.dispose(TemporaryResources.java:152)
> 	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:127)
> 	at org.apache.tika.gui.TikaGUI.handleStream(TikaGUI.java:320)
> 	at org.apache.tika.gui.TikaGUI.openFile(TikaGUI.java:279)
> 	at org.apache.tika.gui.ParsingTransferHandler.importFiles(ParsingTransferHandler.java:94)
> 	at org.apache.tika.gui.ParsingTransferHandler.importData(ParsingTransferHandler.java:77)
> 	at javax.swing.TransferHandler.importData(Unknown Source)
> 	at javax.swing.TransferHandler$DropHandler.drop(Unknown Source)
> ....
> Caused by: java.io.IOException: Could not delete temporary file C:\Users\john\AppData\Local\Temp\apache-tika-693752014807275949.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.TemporaryResources.dispose(TemporaryResources.java:150)
> 	... 40 more
> I know that the parser for this file is new and its external source parser has some potential
bugs, but this exception does not occur when using Tika CLI to detect / parse the test file.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message