You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by GitBox <gi...@apache.org> on 2020/09/23 14:48:49 UTC

[GitHub] [tika] tbentleypfpt edited a comment on pull request #356: Attempt to read zips with STORED data descriptors

tbentleypfpt edited a comment on pull request #356:
URL: https://github.com/apache/tika/pull/356#issuecomment-697478056


   @PeterAlfredLee - I just put that zip generation code into the ZipParserTest but it's throwing a 'Truncated Zip File' exception when run.
   
   org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from org.apache.tika.parser.pkg.PackageParser@3688eb5b
   
   	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:283)
   	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:277)
   	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
   	at org.apache.tika.parser.pkg.ZipParserTest.testZipUsingStoredWithDataDescriptor(ZipParserTest.java:88)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
   	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
   Caused by: org.apache.tika.io.TaggedIOException: Truncated ZIP file
   	at org.apache.tika.io.TaggedInputStream.handleIOException(TaggedInputStream.java:133)
   	at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:106)
   	at org.apache.tika.io.IOUtils.read(IOUtils.java:935)
   	at org.apache.tika.detect.zip.DefaultZipContainerDetector.detect(DefaultZipContainerDetector.java:101)
   	at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:84)
   	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:116)
   	at org.apache.tika.parser.DelegatingParser.parse(DelegatingParser.java:72)
   	at org.apache.tika.extractor.ParsingEmbeddedDocumentExtractor.parseEmbedded(ParsingEmbeddedDocumentExtractor.java:105)
   	at org.apache.tika.parser.pkg.PackageParser.parseEntry(PackageParser.java:351)
   	at org.apache.tika.parser.pkg.PackageParser.readEntries(PackageParser.java:303)
   	at org.apache.tika.parser.pkg.PackageParser.parse(PackageParser.java:285)
   	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:277)
   	... 29 more
   Caused by: org.apache.tika.io.TaggedIOException: Truncated ZIP file
   	at org.apache.tika.io.TaggedInputStream.handleIOException(TaggedInputStream.java:133)
   	at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:106)
   	at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:102)
   	at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:102)
   	... 39 more
   Caused by: java.io.IOException: Truncated ZIP file
   	at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readStoredEntry(ZipArchiveInputStream.java:934)
   	at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readStored(ZipArchiveInputStream.java:544)
   	at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.read(ZipArchiveInputStream.java:486)
   	at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
   	at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
   	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
   	at org.apache.tika.io.ProxyInputStream.read(ProxyInputStream.java:102)
   	... 41 more


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org