apache/dolphinscheduler · error · LogicTaskFactoryNotFoundException

Cannot find the logic task factory: ${taskType}

Error message

Cannot find the logic task factory: ${taskType}

What it means

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.

Source

Thrown at dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/executor/plugin/LogicTaskPluginFactoryBuilder.java:48

@Slf4j
@Component
public class LogicTaskPluginFactoryBuilder {

    private final Map<String, ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>>> logicTaskPluginFactoryMap =
            new ConcurrentHashMap<>();

    public LogicTaskPluginFactoryBuilder(List<ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>>> logicTaskPluginFactories) {
        logicTaskPluginFactories.forEach(
                logicTaskPluginFactory -> logicTaskPluginFactoryMap.put(logicTaskPluginFactory.getTaskType(),
                        logicTaskPluginFactory));
    }

    public ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>> createILogicTaskPluginFactory(String taskType) throws LogicTaskFactoryNotFoundException {
        ILogicTaskPluginFactory<? extends ILogicTask<? extends AbstractParameters>> logicTaskPluginFactory =
                logicTaskPluginFactoryMap.get(taskType);
        if (logicTaskPluginFactory == null) {
            throw new LogicTaskFactoryNotFoundException("Cannot find the logic task factory: " + taskType);
        }
        return logicTaskPluginFactory;
    }

}

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Confirm the task type is a supported logic task and its plugin jar is in the master's libs/classpath
  2. Upgrade the master to a version that supports the task type
  3. Fix the workflow definition if the taskType value is wrong or misspelled

Example fix

// before: running 'DATA_QUALITY' on a master without the data-quality plugin
// after: add dolphinscheduler-task-dataquality jar to master/libs and restart master
Defensive patterns

Strategy: try-catch

Validate before calling

// check known logic task types before scheduling
Set<String> supported = logicTaskPluginFactoryBuilder.getLogicTaskPluginFactoryMap().keySet();
if (!supported.contains(taskType)) { /* flag workflow as invalid */ }

Try / catch

try {
    var factory = builder.createILogicTaskPluginFactory(taskType);
} catch (LogicTaskFactoryNotFoundException e) {
    log.error("Logic task plugin missing for type {}", taskType, e);
    taskExecutionContext.setTaskFailed();
}

Prevention

When it happens

Trigger: 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.

Common situations: Upgrading workflows created in newer DolphinScheduler versions to an older master, custom logic task plugins not bundled, or corrupted task definitions.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/ee3c00604a5e4f11. Report an issue: GitHub.