apache/flink · error · IllegalArgumentException
Multiple JARs with manifest attribute for entry class: %s
Error message
Multiple JARs with manifest attribute for entry class: %s
What it means
Error "Multiple JARs with manifest attribute for entry class: %s" thrown in apache/flink.
Source
Thrown at flink-clients/src/main/java/org/apache/flink/client/deployment/application/JarManifestParser.java:87
*/
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException {
List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>();
for (File jarFile : jarFiles) {
findEntryClass(jarFile)
.ifPresent(
entryClass ->
jarsWithEntryClasses.add(
new JarFileWithEntryClass(jarFile, entryClass)));
}
int size = jarsWithEntryClasses.size();
if (size == 0) {
throw new NoSuchElementException("No JAR with manifest attribute for entry class");
}
if (size == 1) {
return jarsWithEntryClasses.get(0);
}
// else: size > 1
throw new IllegalArgumentException(
"Multiple JARs with manifest attribute for entry class: " + jarsWithEntryClasses);
}
/**
* Returns the entry class as specified in the manifest of the provided JAR file.
*
* <p>The following manifest attributes are checked in order to find the entry class:
*
* <ol>
* <li>{@link PackagedProgram#MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS}
* <li>{@link PackagedProgram#MANIFEST_ATTRIBUTE_MAIN_CLASS}
* </ol>
*
* @param jarFile JAR file to parse
* @return Optional holding entry class
* @throws IOException If there is an error accessing the JAR
*/
@VisibleForTestingView on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Multiple JARs with manifest attribute for entry class: the reported value
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Multiple JARs with manifest attribute for entry class: the reported value") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Multiple JARs with manifest attribute for entry class: the reported value.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Multiple JARs with manifest attribute for entry class: the reported value.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/c19d16281a2498b2.
Report an issue: GitHub.