apache/seatunnel · error · UnsupportedOperationException

Plugin instance: %s is not supported.

Error message

Plugin instance: %s is not supported.

What it means

loadPluginInstance iterates candidate plugin instances and returns the one whose plugin name matches the requested PluginIdentifier. If a discovered instance's class type is not recognized/supported by the discovery logic, it throws UnsupportedOperationException naming the instance.

Source

Thrown at seatunnel-plugin-discovery/src/main/java/org/apache/seatunnel/plugin/discovery/AbstractPluginDiscovery.java:404

            factories =
                    FactoryUtil.discoverFactories(Thread.currentThread().getContextClassLoader());
        }
        return factories;
    }

    protected T loadPluginInstance(PluginIdentifier pluginIdentifier, ClassLoader classLoader) {
        ServiceLoader<T> serviceLoader = ServiceLoader.load(getPluginBaseClass(), classLoader);
        for (T t : serviceLoader) {
            if (t instanceof PluginIdentifierInterface) {
                // new api
                PluginIdentifierInterface pluginIdentifierInstance = (PluginIdentifierInterface) t;
                if (StringUtils.equalsIgnoreCase(
                        pluginIdentifierInstance.getPluginName(),
                        pluginIdentifier.getPluginName())) {
                    return (T) pluginIdentifierInstance;
                }
            } else {
                throw new UnsupportedOperationException(
                        "Plugin instance: " + t + " is not supported.");
            }
        }
        return null;
    }

    /**
     * Get the plugin instance.
     *
     * @param pluginIdentifier plugin identifier.
     * @return plugin instance.
     */
    protected Optional<List<URL>> getPluginJarPath(PluginIdentifier pluginIdentifier) {
        return pluginJarPath.computeIfAbsent(pluginIdentifier, this::findPluginJarPath);
    }

    /**
     * Get spark plugin interface.

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check that the connector jar version matches your SeaTunnel engine version and re-download from install-plugin.sh
  2. Verify the plugin implements the correct current API interface (Source/Sink/TransformFactory with proper @Factory annotation)
  3. Remove duplicate or stale jars for the same plugin from the connectors directory
  4. If custom, rebuild the plugin against the SeaTunnel API module version you deploy

Example fix

// before: mixed connector versions in plugins dir
connectors/connector-jdbc-2.3.0.jar
connectors/connector-jdbc-2.3.12.jar
// after: keep only the version matching the engine
rm connectors/connector-jdbc-2.3.0.jar
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify jar versions match the engine before launch
ls $SEATUNNEL_HOME/connectors | grep -v "connector-.*-${SEATUNNEL_VERSION}\.jar" && echo 'stale connector versions present'

Try / catch

try {
    pluginInstance(PluginIdentifier.of(...));
} catch (UnsupportedOperationException e) {
    LOG.error("Incompatible plugin jar for {}: {}", pluginId, e.getMessage());
    throw new SeaTunnelException("Reinstall matching connector jar", e);
}

Prevention

When it happens

Trigger: loadPluginInstance (via pluginInstance/createOptionalPluginInstance) encounters an instance whose class does not match expected factory/instance shapes while matching the plugin identifier — e.g. a class in the jar implements an unexpected interface or an incompatible SeaTunnel API version.

Common situations: Connector jar built against a different SeaTunnel API version placed in the plugin dir; custom plugin implementing an outdated or wrong interface; shaded/duplicated plugin classes confusing type checks.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/b8551ebfb4f535a1. Report an issue: GitHub.