Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-286

Error while expanding 7z java.io.EOFException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8, 1.8.1
    • 1.9
    • Archivers
    • Windows8, Java6

    Description

      Using 7zip (9.2) able to extract these downloaded files
      http://downloads.sourceforge.net/sourceforge/wxwindows/3.0.0/binaries/wxMSW-3.0.0_vc120_Dev.7z
      http://downloads.sourceforge.net/sourceforge/wxwindows/3.0.0/binaries/wxMSW-3.0.0_vc120_ReleaseDLL.7z

      Commons-compress 1.6 had issues with these files that seemed related to COMPRESS-257 so tried to use 1.8 as identified fixed in version. Some issues where fixed.

      Using maven + antrun
      <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.7</version>
      <dependencies>
      <dependency>
      <groupId>ant-contrib</groupId>
      <artifactId>ant-contrib</artifactId>
      <version>1.0b3</version>
      <exclusions>
      <exclusion>
      <groupId>ant</groupId>
      <artifactId>ant</artifactId>
      </exclusion>
      </exclusions>
      </dependency>
      <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant-nodeps</artifactId>
      <version>1.8.1</version>
      </dependency>
      <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.8</version>
      </dependency>
      <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant-compress</artifactId>
      <version>1.4</version>
      </dependency>
      </dependencies>

      Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Error while expanding Z:\download\wxMSW-3.0.0_vc120_Dev.7z
      java.io.EOFException
      around Ant part ...<un7z dest="C:\target/x86" overwrite="false" sr
      c="z:\download/wxMSW-3.0.0_vc120_Dev.7z"/>... @ 26:237 in C:\target\antrun\build-download.xml
      at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      ... 17 more
      Caused by: c:\target\antrun\build-download.xml:26: Error while expand
      ing c:\download\wxMSW-3.0.0_vc120_Dev.7z
      java.io.EOFException
      at org.apache.ant.compress.taskdefs.Un7z.expandFile(Un7z.java:92)
      at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:132)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      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.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:390)
      at org.apache.tools.ant.Target.performTasks(Target.java:411)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327)
      ... 19 more
      Caused by: java.io.EOFException
      at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:273)
      at org.tukaani.xz.rangecoder.RangeDecoderFromStream.normalize(Unknown Source)
      at org.tukaani.xz.rangecoder.RangeDecoder.decodeBit(Unknown Source)
      at org.tukaani.xz.lzma.LZMADecoder$LiteralDecoder$LiteralSubdecoder.decode(Unknown Source)
      at org.tukaani.xz.lzma.LZMADecoder$LiteralDecoder.decode(Unknown Source)
      at org.tukaani.xz.lzma.LZMADecoder.decode(Unknown Source)
      at org.tukaani.xz.LZMAInputStream.read(Unknown Source)
      at org.tukaani.xz.SimpleInputStream.read(Unknown Source)
      at org.apache.commons.compress.utils.BoundedInputStream.read(BoundedInputStream.java:62)
      at org.apache.commons.compress.utils.ChecksumVerifyingInputStream.read(ChecksumVerifyingInputStream.java:85)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.read(SevenZFile.java:900)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.read(SevenZFile.java:886)
      at org.apache.ant.compress.taskdefs.Un7z$1.read(Un7z.java:77)
      at org.apache.tools.ant.taskdefs.Expand.extractFile(Expand.java:343)
      at org.apache.ant.compress.taskdefs.Un7z.expandFile(Un7z.java:71)
      ... 32 more

      I noticed while raising this that there is a newer 1.8.1 version, which still seems to have the same issue, now in a different location.

      Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Error while expanding Z:\download\wxMSW-3.0.0_vc120_ReleaseDLL.7z
      java.io.EOFException
      around Ant part ...<un7z dest="C:\Data/x86" overwrite="false" sr
      c="Z:/download/wxMSW-3.0.0_vc120_ReleaseDLL.7z"/>... @ 27:244 in C:\target\antrun\build-download.xml
      at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      ... 17 more
      Caused by: c:\target\antrun\build-download.xml:27: Error while expanding Z:\download\wxMSW-3.0.0_vc120_ReleaseDLL.7z
      java.io.EOFException
      at org.apache.ant.compress.taskdefs.Un7z.expandFile(Un7z.java:92)
      at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:132)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      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.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:390)
      at org.apache.tools.ant.Target.performTasks(Target.java:411)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327)
      ... 19 more
      Caused by: java.io.EOFException
      at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:273)
      at org.tukaani.xz.rangecoder.RangeDecoderFromStream.normalize(Unknown Source)
      at org.tukaani.xz.rangecoder.RangeDecoder.decodeBit(Unknown Source)
      at org.tukaani.xz.lzma.LZMADecoder$LiteralDecoder$LiteralSubdecoder.decode(Unknown Source)
      at org.tukaani.xz.lzma.LZMADecoder$LiteralDecoder.decode(Unknown Source)
      at org.tukaani.xz.lzma.LZMADecoder.decode(Unknown Source)
      at org.tukaani.xz.LZMAInputStream.read(Unknown Source)
      at org.tukaani.xz.SimpleInputStream.read(Unknown Source)
      at org.apache.commons.compress.utils.BoundedInputStream.read(BoundedInputStream.java:62)
      at org.apache.commons.compress.utils.ChecksumVerifyingInputStream.read(ChecksumVerifyingInputStream.java:85)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.read(SevenZFile.java:906)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.read(SevenZFile.java:889)
      at org.apache.ant.compress.taskdefs.Un7z$1.read(Un7z.java:77)
      at org.apache.tools.ant.taskdefs.Expand.extractFile(Expand.java:343)
      at org.apache.ant.compress.taskdefs.Un7z.expandFile(Un7z.java:71)
      ... 32 more

      The last file appears to be intact but has an incorrect (current) timestamp.
      If the file is already present then the exception doesn't get raised.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            gdomjan Greg Domjan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment