{"record":{"id":"6c64dcd73870bae9","repo":"apache/flink","slug":"unknown-resolve-order-resolveorder","errorCode":null,"errorMessage":"Unknown resolve order: {resolveOrder}","messagePattern":"Unknown resolve order: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/util/FlinkUserCodeClassLoaders.java","lineNumber":123,"sourceCode":"    private static MutableURLClassLoader wrapWithSafetyNet(\n            FlinkUserCodeClassLoader classLoader, boolean check) {\n        return check\n                ? new SafetyNetWrapperClassLoader(classLoader, classLoader.getParent())\n                : classLoader;\n    }\n\n    /** Class resolution order for Flink URL {@link ClassLoader}. */\n    public enum ResolveOrder {\n        CHILD_FIRST,\n        PARENT_FIRST;\n\n        public static ResolveOrder fromString(String resolveOrder) {\n            if (resolveOrder.equalsIgnoreCase(\"parent-first\")) {\n                return PARENT_FIRST;\n            } else if (resolveOrder.equalsIgnoreCase(\"child-first\")) {\n                return CHILD_FIRST;\n            } else {\n                throw new IllegalArgumentException(\"Unknown resolve order: \" + resolveOrder);\n            }\n        }\n    }\n\n    /**\n     * Regular URLClassLoader that first loads from the parent and only after that from the URLs.\n     */\n    @Internal\n    public static class ParentFirstClassLoader extends FlinkUserCodeClassLoader {\n\n        ParentFirstClassLoader(\n                URL[] urls, ClassLoader parent, Consumer<Throwable> classLoadingExceptionHandler) {\n            super(urls, parent, classLoadingExceptionHandler);\n        }\n\n        static {\n            ClassLoader.registerAsParallelCapable();\n        }","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/util/FlinkUserCodeClassLoaders.java#L105-L141","documentation":"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.","triggerScenarios":"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'.","commonSituations":"Copy-pasted config from other systems (some use parent_first with underscores); older docs or blog posts using wrong spellings; fat-fingered YAML values.","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"],"exampleFix":"# before\nclassloader.resolve-order: child_first\n\n# after\nclassloader.resolve-order: child-first","handlingStrategy":"validation","validationCode":"String v = conf.getString(\"classloader.resolve-order\", \"child-first\");\nif (!v.equalsIgnoreCase(\"child-first\") && !v.equalsIgnoreCase(\"parent-first\")) {\n    throw new IllegalArgumentException(\"classloader.resolve-order must be child-first or parent-first: \" + v);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exactly 'child-first' or 'parent-first' (hyphen, no underscore)","Add config linting in CI for flink-conf.yaml keys"],"tags":["classloader","configuration","startup"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}