File.createTempFile is called with the given directory's name as a prefix. If it's too short, this will fail with an IllegalArgumentException. The prefix should be padded so this doesn't happen.
File destinationFile = new File("/var/tmp/1")
File sourceFile = new File("/var/tmp/2")
Archiver arch = ArchiverFactory.createArchiver(ArchiveFormat.TAR, CompressionType.GZIP)
File archiveFile = arch.create("64cacf30-b294-49f4-b166-032a808d73cd", destinationFile, sourceFile)