apache/flink · error · NoSuchElementException
No JAR with manifest attribute for entry class
Error message
No JAR with manifest attribute for entry class
What it means
Error "No JAR with manifest attribute for entry class" thrown in apache/flink.
Source
Thrown at flink-clients/src/main/java/org/apache/flink/client/deployment/application/JarManifestParser.java:81
* Returns a JAR file with its entry class as specified in the manifest.
*
* @param jarFiles JAR files to parse
* @throws NoSuchElementException if no JAR file contains an entry class attribute
* @throws IllegalArgumentException if multiple JAR files contain an entry class manifest
* attribute
*/
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>View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: No JAR with manifest attribute for entry class
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("No JAR with manifest attribute for entry class") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: No JAR with manifest attribute for entry class.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: No JAR with manifest attribute for entry class.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/8bd4b79d96b408ac.
Report an issue: GitHub.