Ali Kamali created COMPRESS-587:
-----------------------------------
Summary: 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
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)