alibaba/canal · error · CanalException

unsupport SourcingType for {}

Error message

unsupport SourcingType for {}

What it means

Thrown in doInitEventParser() (CanalInstanceWithManager.java:389-390) when SourcingType.isOracle() is true. Canal explicitly rejects Oracle as a data source — only MYSQL, LOCALBINLOG (and GROUP at the outer initEventParser level) are implemented. The exception text 'unsupport SourcingType for ' + type mirrors the unsupported-feature pattern used elsewhere in the file.

Source

Thrown at instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/CanalInstanceWithManager.java:390

            localBinlogEventParser.setConnectionCharset(parameters.getConnectionCharset());
            localBinlogEventParser.setDirectory(parameters.getLocalBinlogDirectory());
            localBinlogEventParser.setProfilingEnabled(false);
            localBinlogEventParser.setDetectingEnable(parameters.getDetectingEnable());
            localBinlogEventParser.setDetectingIntervalInSeconds(parameters.getDetectingIntervalInSeconds());
            localBinlogEventParser.setFilterTableError(parameters.getFilterTableError());
            localBinlogEventParser.setParallel(parameters.getParallel());
            // 数据库信息,反查表结构时需要
            if (!CollectionUtils.isEmpty(dbAddresses)) {
                localBinlogEventParser.setMasterInfo(new AuthenticationInfo(dbAddresses.get(0),
                    parameters.getDbUsername(),
                    parameters.getDbPassword(),
                    parameters.getDefaultDatabaseName(),
                    parameters.getSslInfo()));
            }

            eventParser = localBinlogEventParser;
        } else if (type.isOracle()) {
            throw new CanalException("unsupport SourcingType for " + type);
        } else {
            throw new CanalException("unsupport SourcingType for " + type);
        }

        // add transaction support at 2012-12-06
        if (eventParser instanceof AbstractEventParser) {
            AbstractEventParser abstractEventParser = (AbstractEventParser) eventParser;
            abstractEventParser.setTransactionSize(parameters.getTransactionSize());
            abstractEventParser.setLogPositionManager(initLogPositionManager());
            abstractEventParser.setAlarmHandler(getAlarmHandler());
            abstractEventParser.setEventSink(getEventSink());

            if (StringUtils.isNotEmpty(filter)) {
                AviaterRegexFilter aviaterFilter = new AviaterRegexFilter(filter);
                abstractEventParser.setEventFilter(aviaterFilter);
            }

            // 设置黑名单

View on GitHub (pinned to 87be50e876)

Solutions

  1. Use a supported sourcing type: MYSQL or LOCALBINLOG. For Oracle CDC use a dedicated tool (e.g. Debezium with the Oracle connector, Oracle LogMiner/XStream).
  2. If processing Oracle-originated data already captured elsewhere, point canal at a MySQL/local-binlog source or an intermediary.
  3. Remove canal.instance.db.sourcingType = ORACLE from the instance config.

Example fix

# before
canal.instance.db.sourcingType = ORACLE

# after — supported type
canal.instance.db.sourcingType = MYSQL
Defensive patterns

Strategy: validation

Validate before calling

if (parameters.getSourcingType().isOracle()) {
    throw new IllegalArgumentException(
        "SourcingType.ORACLE is not supported by canal; use MYSQL or LOCALBINLOG, or a dedicated Oracle CDC tool.");
}

Prevention

When it happens

Trigger: Configuring canal.instance.db.sourcingType = ORACLE (or returning SourcingType.ORACLE from a custom parameter source) and starting the instance. doInitEventParser reaches the isOracle() branch and throws during parser construction.

Common situations: Operator expects Oracle CDC support (canal's name/lineage is MySQL-oriented but the enum still lists ORACLE); legacy config from a fork that once supported Oracle; misreading documentation that mentions Oracle as a roadmap item.

Related errors


AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14). Data as JSON: /api/errors/d5610c891d6793ee. Report an issue: GitHub.