You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Lee (Jira)" <ji...@apache.org> on 2021/09/13 11:39:00 UTC
[jira] [Commented] (COMPRESS-587) 1.21 throws
IllegalArgumentException in putArchiveEntry
[ https://issues.apache.org/jira/browse/COMPRESS-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17414154#comment-17414154 ]
Peter Lee commented on COMPRESS-587:
------------------------------------
Hi [~kamali.ali]
Thank you for your reporting.
Could you provide a detailed test to reproduce this problem?
> 1.21 throws IllegalArgumentException in putArchiveEntry
> -------------------------------------------------------
>
> Key: COMPRESS-587
> URL: https://issues.apache.org/jira/browse/COMPRESS-587
> Project: Commons Compress
> Issue Type: Bug
> Components: Compressors
> Affects Versions: 1.21
> Reporter: Ali Kamali
> Priority: Major
>
> Code stopped working after the upgrade to 1.21 with the following stacktrace:
> {noformat}
> 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) {noformat}
> Code looks like this:
> {noformat}
> val tarOutput = new TarArchiveOutputStream(new BufferedOutputStream(new FileOutputStream(outputTarFile)))
> val entry = new TarArchiveEntry(file, fileName)
> tarOutput.putArchiveEntry(archiveEntry)
> {noformat}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)