apache/seatunnel · error · IllegalArgumentException

Option '${option}' cannot be blank

Error message

Option '${option}' cannot be blank

What it means

AzureQueueConfigValidator.requireNonBlank throws this when a required client option (connection string, queue name, endpoint, account name, etc.) is null or whitespace-only. It is a fail-fast guard during config validation so the connector never builds a client with an unusable value.

Source

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

                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)

Solutions

  1. Set the reported option to a non-blank value in the source/sink config (e.g. connection_string, storage_account_name, queue_name)
  2. Check that the environment variable or placeholder referenced by the config is actually set in the runtime environment
  3. Verify the option name spelling matches the plugin's Option definitions (exact kebab/snake-case)
  4. Choose an authentication_type whose required options you actually provide

Example fix

// before
connection_string = ""
// after
connection_string = "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=..."
Defensive patterns

Strategy: validation

Validate before calling

java
List<String> required = List.of("connection_string", "queue_name");
for (String opt : required) {
    String v = config.get(opt);
    if (v == null || v.trim().isEmpty()) {
        throw new IllegalArgumentException("Option '" + opt + "' cannot be blank");
    }
}

Type guard

java
boolean isNonBlank(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

java
try {
    AzureQueueSinkConfig.from(config);
} catch (IllegalArgumentException e) {
    if (e.getMessage().contains("cannot be blank")) {
        log.error("Missing required Azure Queue option: {}", e.getMessage());
    } else { throw e; }
}

Prevention

When it happens

Trigger: Calling validateClient (via AzureQueueSinkConfig.from or AzureQueueSourceConfig.from) with a required client option that is null, empty string, or only whitespace, e.g. 'connection_string=""' or a missing queue_name for the selected authentication_type.

Common situations: Env var like AZURE_STORAGE_CONNECTION_STRING not set and interpolated as empty; YAML key typo so the option falls back to null; trailing spaces in HOCON after copying from docs; option omitted because a different authentication_type was intended.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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