You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Antoni Mylka (JIRA)" <ji...@apache.org> on 2010/08/19 20:29:17 UTC

[jira] Updated: (TIKA-487) ContainerAwareDetector doesn't support truncated Open XML files

     [ https://issues.apache.org/jira/browse/TIKA-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoni Mylka updated TIKA-487:
------------------------------

    Attachment: tika-truncated-ooxml-file.patch

A patch with a test that exposes the problem

> ContainerAwareDetector doesn't support truncated Open XML files
> ---------------------------------------------------------------
>
>                 Key: TIKA-487
>                 URL: https://issues.apache.org/jira/browse/TIKA-487
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Antoni Mylka
>         Attachments: tika-truncated-ooxml-file.patch
>
>
> When I try to run the detector on a truncated Open XML file I get an exception
> java.util.zip.ZipException: error in opening zip file
> 	at java.util.zip.ZipFile.open(Native Method)
> 	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
> 	at java.util.zip.ZipFile.<init>(ZipFile.java:131)
> 	at org.apache.tika.detect.ZipContainerDetector.detect(ZipContainerDetector.java:52)
> 	at org.apache.tika.detect.ZipContainerDetector.detect(ZipContainerDetector.java:45)
> 	at org.apache.tika.detect.ContainerAwareDetector.detect(ContainerAwareDetector.java:77)
> 	at org.apache.tika.detect.ContainerAwareDetector.detect(ContainerAwareDetector.java:59)
> 	at org.apache.tika.detect.TestContainerAwareDetector.testTruncatedOOXMLFile(TestContainerAwareDetector.java:168)
> 	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 junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> This is similar to TIKA-485, there should be a try-catch around the zipDetector

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.