apache/flink · error · FlinkException

Multiple JAR archives with entry classes found on classpath.

Error message

Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.

What it means

Error "Multiple JAR archives with entry classes found on classpath. Please provide an entry class name." thrown in apache/flink.

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)

Solutions

  1. Address the cause reported by the error message: Multiple JAR archives with entry classes found on classpath. Please provide an entry class name.
  2. 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.

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.