apache/flink · error · FlinkException
Multiple JAR archives with entry classes found on…
Error message
Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.
What it means
Thrown by extractJobClassNameFromFileClasspath when more than one JAR on the classpath contains a candidate entry class, making the entry point ambiguous. It fires when an application is submitted with multiple job JARs and no explicit entry class name is configured.
Solutions
- Address the cause reported by the error message: Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.") and rerun the job or command. Defensive patterns
Strategy: validation
When it happens
Trigger: Triggered at runtime when the operation fails because: Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/a4336c012b38d86a.
Report an issue: GitHub.
Appendix: source
Thrown at flink-clients/src/main/java/org/apache/flink/client/deployment/application/FromClasspathEntryClassInformationProvider.java:167
private static String extractJobClassFromUrlClasspath(Iterable<URL> classpath)
throws IOException, FlinkException {
final List<File> jarFilesFromClasspath =
StreamSupport.stream(classpath.spliterator(), false)
.map(url -> new File(url.getFile()))
.filter(f -> isJarFilename(f.getName()))
.collect(Collectors.toList());
return extractJobClassNameFromFileClasspath(jarFilesFromClasspath);
}
private static String extractJobClassNameFromFileClasspath(Iterable<File> classpath)
throws FlinkException, IOException {
try {
return JarManifestParser.findOnlyEntryClass(classpath).getEntryClass();
} catch (NoSuchElementException e) {
throw new FlinkException(
"No JAR found on classpath. Please provide a JAR explicitly.", e);
} catch (IllegalArgumentException e) {
throw new FlinkException(
"Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.",
e);
}
}
private static boolean isJarFilename(String filename) {
return filename.endsWith(".jar");
}
}
View on GitHub (pinned to 2f3c205e92)