apache/flink · error · FlinkException
Could not load the provided entrypoint class.
Error message
Could not load the provided entrypoint class.
What it means
Thrown by DefaultPackagedProgramRetriever.getPackagedProgram when PackagedProgram.newBuilder() fails to resolve and load the entrypoint class it derived from the job class name, the classpath, or the supplied JAR. Typically the class name points to a class absent from the user/system classpath or the JAR is malformed. Check that the entrypoint class exists and is reachable on the configured classpath.
Solutions
- Address the cause reported by the error message: Could not load the provided entrypoint class.
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Could not load the provided entrypoint class.") and rerun the job or command. Defensive patterns
Strategy: try-catch
When it happens
Trigger: Triggered at runtime when the operation fails because: Could not load the provided entrypoint class.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Could not load the provided entrypoint class.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/a6cea009aa5c890e.
Report an issue: GitHub.
Appendix: source
Thrown at flink-clients/src/main/java/org/apache/flink/client/program/DefaultPackagedProgramRetriever.java:231
@Override
public PackagedProgram getPackagedProgram() throws FlinkException {
try {
final PackagedProgram.Builder packagedProgramBuilder =
PackagedProgram.newBuilder()
.setUserClassPaths(userClasspath)
.setArguments(programArguments)
.setConfiguration(configuration);
entryClassInformationProvider
.getJobClassName()
.ifPresent(packagedProgramBuilder::setEntryPointClassName);
entryClassInformationProvider
.getJarFile()
.ifPresent(packagedProgramBuilder::setJarFile);
return packagedProgramBuilder.build();
} catch (ProgramInvocationException e) {
throw new FlinkException("Could not load the provided entrypoint class.", e);
}
}
private static List<URL> getClasspathsFromUserLibDir(
@Nullable File userLibDir, @Nullable File jarFile) throws IOException {
if (userLibDir == null) {
return Collections.emptyList();
}
try (Stream<Path> files = Files.walk(userLibDir.toPath(), FileVisitOption.FOLLOW_LINKS)) {
return getClasspathsFromArtifacts(files, jarFile);
}
}
private static List<URL> getClasspathsFromArtifacts(
@Nullable Collection<File> userArtifacts, @Nullable File jarFile) {
if (userArtifacts == null) {
return Collections.emptyList();View on GitHub (pinned to 2f3c205e92)