apache/seatunnel · error · IllegalArgumentException

Unsupported authentication_type

Error message

Unsupported authentication_type: ${config.getAuthenticationType()}

What it means

AzureQueueConfigValidator.validateClient's credential switch reaches default when authentication_type holds an unrecognized enum constant. Unlike error 266 (thrown later at client build time), this fires during validation, immediately rejecting the config with the offending value in the message.

Solutions

  1. Set authentication_type to CONNECTION_STRING, STORAGE_SHARED_KEY, or SAS_TOKEN
  2. Align the connector plugin version with the SeaTunnel engine version (remove stale jars)
  3. Check the enum in AzureQueueAuthenticationType for the exact accepted names in your version

Example fix

// before
authentication_type = SHARED_KEY (unknown constant)
// after
authentication_type = STORAGE_SHARED_KEY
Defensive patterns

Strategy: validation

Validate before calling

Set<String> allowed = Set.of("CONNECTION_STRING", "STORAGE_SHARED_KEY", "SAS_TOKEN");
if (raw != null && !allowed.contains(raw.trim())) {
  throw new IllegalArgumentException("authentication_type must be one of " + allowed + ", got " + raw);
}

Try / catch

try { validate(config); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unsupported authentication_type")) { log.error("Bad authentication_type value: {}", e.getMessage()); } throw e; }

Prevention

When it happens

Trigger: validateClient called with an authenticationType that is non-null but not one of CONNECTION_STRING, STORAGE_SHARED_KEY, SAS_TOKEN — e.g. a value from a newer/newer-removed enum version or programmatically constructed enum constant.

Common situations: Config value mapped to an enum in a different connector version; mixed jar versions between seatunnel distribution and connector plugin; reflection-based enum parsing admitting an unknown constant.

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


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-azure-queue-storage/src/main/java/org/apache/seatunnel/connectors/seatunnel/azure/queue/config/AzureQueueConfigValidator.java:77

                rejectPresent(
                        config.getConnectionString(),
                        "connection_string",
                        config.getSasToken(),
                        "sas_token");
                break;
            case SAS_TOKEN:
                requireNonBlank(config.getEndpoint(), "endpoint");
                requireNonBlank(config.getSasToken(), "sas_token");
                rejectPresent(
                        config.getConnectionString(),
                        "connection_string",
                        config.getAccountName(),
                        "account_name",
                        config.getAccountKey(),
                        "account_key");
                break;
            default:
                throw new IllegalArgumentException(
                        "Unsupported authentication_type: " + config.getAuthenticationType());
        }
    }

    static void requireNonBlank(String value, String option) {
        if (value == null || value.trim().isEmpty()) {
            throw new IllegalArgumentException("Option '" + option + "' cannot be blank");
        }
    }

    private static void rejectPresent(Object... valuesAndOptions) {
        for (int index = 0; index < valuesAndOptions.length; index += 2) {
            if (valuesAndOptions[index] != null) {
                throw new IllegalArgumentException(
                        "Option '"
                                + valuesAndOptions[index + 1]
                                + "' is not valid for the selected authentication_type");
            }

View on GitHub (pinned to cf67b549a7)