apache/flink · error · IllegalArgumentException
Unknown resolve order: {resolveOrder}
Error message
Unknown resolve order: {resolveOrder} What it means
ResolveOrder.fromString parses the 'classloader.resolve-order' config string: 'parent-first' and 'child-first' (case-insensitive) map to enum constants; anything else throws IllegalArgumentException("Unknown resolve order: " + resolveOrder). This is the user-facing guard for the classloader resolve-order setting — it fails fast at job/client startup on a bad config value.
Source
Thrown at flink-core/src/main/java/org/apache/flink/util/FlinkUserCodeClassLoaders.java:123
private static MutableURLClassLoader wrapWithSafetyNet(
FlinkUserCodeClassLoader classLoader, boolean check) {
return check
? new SafetyNetWrapperClassLoader(classLoader, classLoader.getParent())
: classLoader;
}
/** Class resolution order for Flink URL {@link ClassLoader}. */
public enum ResolveOrder {
CHILD_FIRST,
PARENT_FIRST;
public static ResolveOrder fromString(String resolveOrder) {
if (resolveOrder.equalsIgnoreCase("parent-first")) {
return PARENT_FIRST;
} else if (resolveOrder.equalsIgnoreCase("child-first")) {
return CHILD_FIRST;
} else {
throw new IllegalArgumentException("Unknown resolve order: " + resolveOrder);
}
}
}
/**
* Regular URLClassLoader that first loads from the parent and only after that from the URLs.
*/
@Internal
public static class ParentFirstClassLoader extends FlinkUserCodeClassLoader {
ParentFirstClassLoader(
URL[] urls, ClassLoader parent, Consumer<Throwable> classLoadingExceptionHandler) {
super(urls, parent, classLoadingExceptionHandler);
}
static {
ClassLoader.registerAsParallelCapable();
}View on GitHub (pinned to 2f3c205e92)
Solutions
- Set classloader.resolve-order: child-first (or parent-first) exactly, hyphenated and lowercase-insensitive
- Search flink-conf.yaml, job-submission options and programmatic Configuration for the key 'classloader.resolve-order' and correct every occurrence
- If migrating vendor config, map its values onto Flink's two supported strings before submission
Example fix
# before classloader.resolve-order: child_first # after classloader.resolve-order: child-first
Defensive patterns
Strategy: validation
Validate before calling
String v = conf.getString("classloader.resolve-order", "child-first");
if (!v.equalsIgnoreCase("child-first") && !v.equalsIgnoreCase("parent-first")) {
throw new IllegalArgumentException("classloader.resolve-order must be child-first or parent-first: " + v);
} Prevention
- Use exactly 'child-first' or 'parent-first' (hyphen, no underscore)
- Add config linting in CI for flink-conf.yaml keys
When it happens
Trigger: Setting classloader.resolve-order to a misspelled or unsupported value in flink-conf.yaml, e.g. 'childfirst', 'child_first', 'parent_first', or vendor-specific values like 'app-first'.
Common situations: Copy-pasted config from other systems (some use parent_first with underscores); older docs or blog posts using wrong spellings; fat-fingered YAML values.
Related errors
- The configuration directory '{}', specified in the '{}' envi
- The configuration directory was not specified. Please specif
- No valid command-line found.
- Given configuration directory is null, cannot load configura
- The given configuration directory name '{}' ({}) does not de
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/6c64dcd73870bae9.
Report an issue: GitHub.