{"record":{"id":"ee3c00604a5e4f11","repo":"apache/dolphinscheduler","slug":"cannot-find-the-logic-task-factory-tasktype","errorCode":null,"errorMessage":"Cannot find the logic task factory: ${taskType}","messagePattern":"Cannot find the logic task factory: (.+?)","errorType":"exception","errorClass":"LogicTaskFactoryNotFoundException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/executor/plugin/LogicTaskPluginFactoryBuilder.java","lineNumber":48,"sourceCode":"\n@Slf4j\n@Component\npublic class LogicTaskPluginFactoryBuilder {\n\n    private final Map<String, ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>>> logicTaskPluginFactoryMap =\n            new ConcurrentHashMap<>();\n\n    public LogicTaskPluginFactoryBuilder(List<ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>>> logicTaskPluginFactories) {\n        logicTaskPluginFactories.forEach(\n                logicTaskPluginFactory -> logicTaskPluginFactoryMap.put(logicTaskPluginFactory.getTaskType(),\n                        logicTaskPluginFactory));\n    }\n\n    public ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>> createILogicTaskPluginFactory(String taskType) throws LogicTaskFactoryNotFoundException {\n        ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>> logicTaskPluginFactory =\n                logicTaskPluginFactoryMap.get(taskType);\n        if (logicTaskPluginFactory == null) {\n            throw new LogicTaskFactoryNotFoundException(\"Cannot find the logic task factory: \" + taskType);\n        }\n        return logicTaskPluginFactory;\n    }\n\n}\n","sourceCodeStart":30,"sourceCodeEnd":54,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/executor/plugin/LogicTaskPluginFactoryBuilder.java#L30-L54","documentation":"LogicTaskPluginFactoryBuilder looks up a logic (server-side) task factory by taskType; when no factory is registered for that type it throws LogicTaskFactoryNotFoundException. Logic tasks like switch, dependent, condition, sub-process, blocking are only executable if their factories were registered during master initialization.","triggerScenarios":"Executing a workflow whose task definition has a logic taskType with no registered factory — e.g. a plugin not on the classpath, a new task type run on an older master, or a typo in the task type stored in the workflow definition.","commonSituations":"Upgrading workflows created in newer DolphinScheduler versions to an older master, custom logic task plugins not bundled, or corrupted task definitions.","solutions":["Confirm the task type is a supported logic task and its plugin jar is in the master's libs/classpath","Upgrade the master to a version that supports the task type","Fix the workflow definition if the taskType value is wrong or misspelled"],"exampleFix":"// before: running 'DATA_QUALITY' on a master without the data-quality plugin\n// after: add dolphinscheduler-task-dataquality jar to master/libs and restart master","handlingStrategy":"try-catch","validationCode":"// check known logic task types before scheduling\nSet<String> supported = logicTaskPluginFactoryBuilder.getLogicTaskPluginFactoryMap().keySet();\nif (!supported.contains(taskType)) { /* flag workflow as invalid */ }","typeGuard":null,"tryCatchPattern":"try {\n    var factory = builder.createILogicTaskPluginFactory(taskType);\n} catch (LogicTaskFactoryNotFoundException e) {\n    log.error(\"Logic task plugin missing for type {}\", taskType, e);\n    taskExecutionContext.setTaskFailed();\n}","preventionTips":["Keep all task plugin jars in master/libs","Before upgrading masters, inventory task types used in workflows","Pin workflow definitions to task types supported by the deployed master version"],"tags":["plugin","task-execution","master-server"],"backgroundTag":"resource-not-found","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}