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

1.21 throws IllegalArgumentException in putArchiveEntry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.21
    • None
    • Compressors
    • None

    Description

      Code stopped working after the upgrade to 1.21 with the following stacktrace:

      java.lang.IllegalArgumentException: group id '673186305' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit                                                                                                                                                                   
         at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.failForBigNumber(TarArchiveOutputStream.java:651)                                                                                                                                                                                              
         at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.failForBigNumberWithPosixMessage(TarArchiveOutputStream.java:644)                                                                                                                                                                              
         at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.failForBigNumbers(TarArchiveOutputStream.java:626)                                                                                                                                                                                             
         at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.putArchiveEntry(TarArchiveOutputStream.java:377) 

      Code looks like this:

      val tarOutput = new TarArchiveOutputStream(new BufferedOutputStream(new FileOutputStream(outputTarFile)))
      val entry = new TarArchiveEntry(file, fileName)
      tarOutput.putArchiveEntry(archiveEntry)
      

      I've traced the issue to this change https://github.com/apache/commons-compress/commit/afaaacf8ce5ffd0735c4b5e70259068327741ab0

      In 1.20 no values where set for userId and groupId (both were 0), with 1.21 I now actually get uid and gid populated and they are both bigger than 2097151.

       

      As a workaround I'll be using STAR or POSIX extensions, but still reporting this as a bug since I wasn't expecting a break in a minor version change. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kamali.ali Ali Kamali
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: