{"record":{"id":"a2647212894a7af6","repo":"apache/flink","slug":"no-executorfactory-found-to-execute-the-applicatio","errorCode":null,"errorMessage":"No ExecutorFactory found to execute the application.","messagePattern":"No ExecutorFactory found to execute the application\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"flink-core/src/main/java/org/apache/flink/core/execution/DefaultExecutorServiceLoader.java","lineNumber":88,"sourceCode":"                    LOG.info(\"Could not load factory due to missing dependencies.\");\n                } else {\n                    throw e;\n                }\n            }\n        }\n\n        if (compatibleFactories.size() > 1) {\n            final String configStr =\n                    configuration.toMap().entrySet().stream()\n                            .map(e -> e.getKey() + \"=\" + e.getValue())\n                            .collect(Collectors.joining(\"\\n\"));\n\n            throw new IllegalStateException(\n                    \"Multiple compatible client factories found for:\\n\" + configStr + \".\");\n        }\n\n        if (compatibleFactories.isEmpty()) {\n            throw new IllegalStateException(\"No ExecutorFactory found to execute the application.\");\n        }\n\n        return compatibleFactories.get(0);\n    }\n\n    @Override\n    public Stream<String> getExecutorNames() {\n        final ServiceLoader<PipelineExecutorFactory> loader =\n                ServiceLoader.load(PipelineExecutorFactory.class);\n\n        return StreamSupport.stream(loader.spliterator(), false)\n                .map(PipelineExecutorFactory::getName);\n    }\n}\n","sourceCodeStart":70,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/core/execution/DefaultExecutorServiceLoader.java#L70-L103","documentation":"Thrown by DefaultExecutorServiceLoader.getExecutorFactory when no PipelineExecutorFactory is compatible with the given configuration. The ServiceLoader found zero factories whose isCompatibleWith returned true (or no factories are registered at all).","triggerScenarios":"No executor implementation JAR on the classpath (missing flink-clients or deployment-specific module). An execution.target or deployment configuration that no registered factory recognizes. SPI service file missing or misconfigured.","commonSituations":"Running a minimal Flink distribution without the clients module. Setting execution.target to an unsupported/typo value (e.g., 'yarn-app'). Shading that drops META-INF/services entries. Missing the deployment connector (yarn/k8s) JAR.","solutions":["Ensure the appropriate executor JAR (flink-clients, flink-yarn, flink-kubernetes) is on the classpath.","Set a valid execution.target (local, remote, yarn-application, yarn-session, kubernetes-application, kubernetes-session).","If shading, preserve META-INF/services/org.apache.flink.core.execution.PipelineExecutorFactory.","Verify the SPI service file exists in the JAR."],"exampleFix":"# before\nexecution.target: yarn-app  # typo\n\n# after\nexecution.target: yarn-application","handlingStrategy":"validation","validationCode":"// Verify an executor factory is registered via SPI\njava.util.ServiceLoader<PipelineExecutorFactory> sl =\n    java.util.ServiceLoader.load(PipelineExecutorFactory.class);\nif (!sl.iterator().hasNext()) {\n    throw new IllegalStateException(\"No PipelineExecutorFactory registered\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    loader.getExecutorFactory(configuration);\n} catch (IllegalStateException e) {\n    if (e.getMessage().equals(\"No ExecutorFactory found to execute the application.\")) { /* add JAR / fix target */ }\n}","preventionTips":["Ensure the correct executor JAR (clients, yarn, kubernetes) is on the classpath.","Use a valid execution.target value.","Preserve META-INF/services entries when shading."],"tags":["execution","deployment","service-loader","classpath"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}