apache/seatunnel · info · IllegalStateException
UTF-8 encoding is not supported
Error message
UTF-8 encoding is not supported
What it means
AirtableConfig.encodePathSegment wraps java.io.UnsupportedEncodingException thrown while URL-encoding a path segment with UTF-8 into an IllegalStateException. Since every JVM is required to support UTF-8, this should practically never happen; it exists to satisfy checked-exception handling. If you see it, the JVM environment has a corrupted charset configuration.
Source
Thrown at seatunnel-connectors-v2/connector-http/connector-http-airtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/airtable/config/AirtableConfig.java:103
"Maximum retries after receiving Airtable 429 responses, must be >= 0.");
public static String buildBaseUrl(String apiBaseUrl, String baseId, String table) {
String normalized =
apiBaseUrl.endsWith("/")
? apiBaseUrl.substring(0, apiBaseUrl.length() - 1)
: apiBaseUrl;
if (!normalized.endsWith(API_VERSION_PATH)) {
normalized = normalized + API_VERSION_PATH;
}
return normalized + "/" + baseId + "/" + encodePathSegment(table);
}
public static String encodePathSegment(String value) {
try {
String encoded = URLEncoder.encode(value, StandardCharsets.UTF_8.name());
return encoded.replace("+", "%20");
} catch (java.io.UnsupportedEncodingException e) {
throw new IllegalStateException("UTF-8 encoding is not supported", e);
}
}
public static Map<String, String> buildAuthHeaders(
String token, Map<String, String> existingHeaders) {
Map<String, String> headers =
Optional.ofNullable(existingHeaders).map(HashMap::new).orElse(new HashMap<>());
headers.put(AUTHORIZATION, BEARER + " " + token);
headers.put(CONTENT_TYPE, APPLICATION_JSON);
return headers;
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Run on a standard JDK/JRE (Temurin/OpenJDK 8+) where UTF-8 is always available.
- Rebuild/repair the runtime image if using a minimal or custom JRE (jlink) that lacks charset providers.
- Remove any JVM agents or -Djava.nio.charset overrides that interfere with charset lookup.
Defensive patterns
Strategy: try-catch
Validate before calling
boolean utf8Ok = "UTF-8".equals(java.nio.charset.Charset.defaultCharset().name()) || java.nio.charset.StandardCharsets.UTF_8 != null;
Try / catch
try { result = AirtableConfig.encodePathSegment(value); } catch (IllegalStateException e) { log.error("JVM lacks UTF-8 charset support", e); throw e; } Prevention
- Use a standard OpenJDK/Temurin runtime image
- Avoid custom jlink runtimes without charset providers
- Don't install agents that alter charset resolution
When it happens
Trigger: Calling encodePathSegment (via buildBaseUrl) on a JVM whose charset provider cannot resolve the name 'UTF-8', e.g. a broken/missing charset provider, an unusual custom JRE, or an agent that tampers with java.nio.charset.
Common situations: Running on a stripped-down or custom JVM/runtime image (e.g. minimal Docker base with a non-standard JRE), or environments where security managers/agents intercept charset lookups. Essentially never triggered by user config.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- UTF-8 encoding is not available
- input.encoding is not supported: ${encodingName} (input id=$
- Error reading default database charsets:
- System or JVM property '${property}' is already defined, but
- Could not read MySQL TIME value as UTF-8
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/8c6edd104bd8e9b9.
Report an issue: GitHub.