apache/seatunnel · error · IllegalArgumentException
The plugin type of seaTunnel only support these options: [so
Error message
The plugin type of seaTunnel only support these options: [source, transform, sink]
What it means
ConnectorCheckCommandArgs.SeaTunnelPluginTypeConverter.convert() throws this IllegalArgumentException when the -t/--plugin-type value cannot be parsed as a PluginType. Only source, transform, and sink are accepted (case-insensitive, matched against the PluginType enum).
Source
Thrown at seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/args/ConnectorCheckCommandArgs.java:61
@Parameter(
names = {"-pt", "--plugin-type"},
description = "SeaTunnel plugin type, support [source, sink, transform]",
converter = SeaTunnelPluginTypeConverter.class)
private PluginType pluginType;
@Override
public Command<?> buildCommand() {
return new ConnectorCheckCommand(this);
}
public static class SeaTunnelPluginTypeConverter implements IStringConverter<PluginType> {
@Override
public PluginType convert(String value) {
try {
return PluginType.valueOf(value.toUpperCase());
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(
"The plugin type of seaTunnel only "
+ "support these options: [source, transform, sink]");
}
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Use one of: --plugin-type source, --plugin-type transform, or --plugin-type sink (case-insensitive)
- Check the PluginType enum for the exact accepted names
- Fix typos/case issues in scripts generating the CLI arguments
Example fix
// before --plugin-type connector // after --plugin-type source
Defensive patterns
Strategy: validation
Validate before calling
const allowed = ['source','transform','sink'];
if (!allowed.includes(pluginType.toLowerCase())) {
throw new Error(`--plugin-type must be one of ${allowed}; got: ${pluginType}`);
} Type guard
const isPluginType = (v) => ['source','transform','sink'].includes(String(v).toLowerCase());
Try / catch
try {
connectorCheck.run(args);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains('[source, transform, sink]')) {
// prompt user / fix the -t value and retry
}
} Prevention
- Only pass source, transform, or sink for --plugin-type
- Check the PluginType enum when in doubt
- Validate user input in scripts before building the CLI command
When it happens
Trigger: Running `seatunnel.sh --check-config`-style connector check with e.g. `--plugin-type connector`, `--plugin-type sourceand Sink`, or any misspelled type that fails PluginType.valueOf.
Common situations: Guessing plugin type names instead of using the enum; scripts parameterized with an empty or wrong type; confusion with plugin jar types.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unsupported dry-run mode '${value}'. Currently only [static,
- SeaTunnel job on st-engine submitted target only support the
- Plugin type must be one of: [source, sink, transform]
- Invalid argument , should have 2 parts
- Invalid filter condition:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/eb524e6f562b46e9.
Report an issue: GitHub.