apache/flink · critical · CliArgsException
Could not build the program from JAR file: {}
Error message
Could not build the program from JAR file: {} What it means
Thrown from AbstractColumnReader.prepareNewPage when initializing the RunLengthDecoder over a dictionary-encoded page's dictionary-id stream fails with IOException. The page's RLE/bit-packing hybrid payload for dictionary ids is unreadable — typically truncated bytes or a malformed RLE block. The column and cause are included.
Source
Thrown at flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:272
try {
File jarFile = jarFilePath != null ? getJarFile(jarFilePath) : null;
return PackagedProgram.getJobJarAndDependencies(jarFile, entryPointClass);
} catch (FileNotFoundException | ProgramInvocationException e) {
throw new CliArgsException(
"Could not get job jar and dependencies from JAR file: " + e.getMessage(), e);
}
}
private PackagedProgram getPackagedProgram(
ProgramOptions programOptions, Configuration effectiveConfiguration)
throws ProgramInvocationException, CliArgsException {
PackagedProgram program;
try {
LOG.info("Building program from JAR file");
program = buildProgram(programOptions, effectiveConfiguration);
} catch (FileNotFoundException e) {
throw new CliArgsException(
"Could not build the program from JAR file: " + e.getMessage(), e);
}
return program;
}
private Configuration getEffectiveConfiguration(
final CustomCommandLine activeCustomCommandLine, final CommandLine commandLine)
throws FlinkException {
final Configuration effectiveConfiguration = new Configuration(configuration);
final Configuration commandLineConfiguration =
checkNotNull(activeCustomCommandLine).toConfiguration(commandLine);
effectiveConfiguration.addAll(commandLineConfiguration);
return effectiveConfiguration;
}View on GitHub (pinned to 2f3c205e92)
Solutions
- Check the cause: an EOF means truncated bytes — verify file size against footer metadata and the object store's ETag/content-length
- Re-copy the file from the source and retry the read; if reproducible the file itself is bad
- Validate with `parquet-tools dump` to see whether the page decodes in a reference implementation
- If this reproduces across readers, report the file to the writing system's maintainers — the writer emitted a malformed RLE stream
Defensive patterns
Strategy: try-catch
Try / catch
try {
reader.readToVector(n, vector);
} catch (IOException e) {
// 'could not read dictionary in col ...' — root cause marks the byte offset
throw new CorruptParquetFileException(file, e);
} Prevention
- Enable server-side checksums (S3 checksums, HDFS crc) so truncated uploads fail before readers see them
- Write files atomically (temp name + rename) so partial files are never visible
- Log descriptor + page number to attribute corruption to a specific producer run
When it happens
Trigger: dataInputStream over the page body ends prematurely while the RunLengthDecoder reads dictionary ids; the RLE run header/length is inconsistent with remaining bytes; byte-level corruption of the page payload.
Common situations: Corrupt or partially-uploaded files in HDFS/S3; files damaged by bad checksumming network transfer; column chunks whose page sizes in metadata disagree with actual bytes.
Related errors
- Error while waiting for job to be initialized
- Could not cancel job {}.
- Missing JobID. Specify a JobID to cancel a job.
- Failed to dispose the savepoint '{}'.
- JAR file does not exist: {}
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/4c1973876c59d4dd.
Report an issue: GitHub.