apache/seatunnel · warning · IllegalArgumentException

Unsupported encoding exists in the parameter.

Error message

Unsupported encoding exists in the parameter.

What it means

Thrown by RestUtil.buildRequestParams when URLDecoder.decode(param[1], "UTF-8") throws UnsupportedEncodingException. Since UTF-8 is always a supported charset on standard JVMs, this is effectively unreachable in practice, but the library defends the API and surfaces it as an IllegalArgumentException naming a problem with parameter encoding.

Solutions

  1. Run on a standard JDK/JRE (JDK 8+) where UTF-8 is guaranteed supported
  2. Verify the JVM's supported charsets (java.nio.charset.Charset.availableCharsets() contains UTF-8)
  3. Pre-decode parameters or use java.net.URLDecoder with StandardCharsets.UTF_8 in custom forks to remove the checked exception path
  4. If seen, report the environment — this indicates a broken JVM installation
Defensive patterns

Strategy: try-catch

Validate before calling

if (!java.nio.charset.Charset.availableCharsets().containsKey("UTF-8")) {
  throw new IllegalStateException("JVM does not support UTF-8; REST parameter decoding will fail");
}

Try / catch

try {
  restUtil.buildRequestParams(uri);
} catch (IllegalArgumentException e) {
  if (e.getMessage().contains("Unsupported encoding")) {
    log.error("JVM charset environment broken; check JVM installation");
  } else throw e;
}

Prevention

When it happens

Trigger: Theoretically raised while URL-decoding any query parameter value in buildRequestParams if the JVM does not support the UTF-8 charset — e.g. running on a stripped/non-standard JVM or unusual JRE image without UTF-8 support.

Common situations: Running SeaTunnel on a minimal or exotic JRE distribution, custom JVM builds with a limited charset provider, or container images missing locale/charset data.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/utils/RestUtil.java:66

    }

    public static void buildRequestParams(Map<String, String> requestParams, String uri) {
        requestParams.put(RestConstant.JOB_ID, null);
        requestParams.put(RestConstant.IS_START_WITH_SAVE_POINT, String.valueOf(false));
        uri = StringUtil.stripTrailingSlash(uri);
        if (!uri.contains("?")) {
            return;
        }
        int indexEnd = uri.indexOf('?');
        try {
            for (String s : uri.substring(indexEnd + 1).split("&")) {
                String[] param = s.split("=");
                requestParams.put(param[0], URLDecoder.decode(param[1], "UTF-8"));
            }
        } catch (IndexOutOfBoundsException e) {
            throw new IllegalArgumentException("Invalid Params format in Params.");
        } catch (UnsupportedEncodingException e) {
            throw new IllegalArgumentException("Unsupported encoding exists in the parameter.");
        }
        if (Boolean.parseBoolean(requestParams.get(RestConstant.IS_START_WITH_SAVE_POINT))
                && requestParams.get(RestConstant.JOB_ID) == null) {
            throw new IllegalArgumentException("Please provide jobId when start with save point.");
        }
    }

    public static Config buildConfig(JsonNode jsonNode) {
        Map<String, Object> objectMap = JsonUtils.toMap(jsonNode);
        return ConfigBuilder.of(objectMap);
    }

    public static List<Tuple2<Map<String, String>, Config>> buildConfigList(JsonNode jsonNode) {
        return StreamSupport.stream(jsonNode.spliterator(), false)
                .filter(JsonNode::isObject)
                .map(
                        node -> {
                            Map<String, Object> nodeMap = JsonUtils.toMap(node);

View on GitHub (pinned to cf67b549a7)