apache/seatunnel · warning
Database configuration option
Error message
Database configuration option '{}' is set but is obsolete, please use '{}' instead What it means
determineConnectionTimeZone resolves the JDBC connectionTimeZone for the MySQL connector. When the modern connectionTimeZone option is not set, it falls back to the obsolete serverTimezone property and warns that the option is deprecated. The fallback value is still applied, so behavior is correct but the config should be migrated.
Solutions
- Rename the option: replace serverTimezone with connectionTimeZone in the JDBC properties.
- Set the value to the MySQL server's actual time zone (e.g. 'UTC', 'Asia/Shanghai').
- Remove the legacy serverTimezone entry to silence the warning.
- Re-run the job and confirm timestamp columns convert as expected.
Example fix
// before database.serverTimezone = UTC // after database.connectionTimeZone = UTC
Defensive patterns
Strategy: validation
Validate before calling
// migrate legacy option before submission
if (props.containsKey("database.serverTimezone") && !props.containsKey("database.connectionTimeZone")) {
props.put("database.connectionTimeZone", props.remove("database.serverTimezone"));
} Prevention
- Use connectionTimeZone in all new MySQL CDC configs.
- Grep config repos for serverTimezone during upgrades and migrate them.
- Document the timezone the MySQL server runs in and pin it explicitly.
When it happens
Trigger: MySqlConnectionConfiguration construction with a dbConfig that omits connectionTimeZone but sets JDBC_PROPERTY_LEGACY_SERVER_TIME_ZONE (serverTimezone); determineConnectionTimeZone then logs this deprecation warning and uses the legacy value.
Common situations: Configs inherited from older Debezium/Flink-CDC setups that used serverTimezone; upgrading MySQL Connector/J from 8.0.23- to newer versions where serverTimezone was replaced by connectionTimeZone; template configs still carrying serverTimezone.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- ' ' is set to 'true'. This setting is not recommended and…
- Error reading default database charsets:
- Error reading default database charsets
- Error reading MySQL variables:
- Error reading MySQL variables
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/756e4c9fa4bdb29c.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java:661
factory =
JdbcConnection.patternBasedFactory(
MySqlConnection.URL_PATTERN,
driverClassName,
getClass().getClassLoader());
}
private static String determineConnectionTimeZone(final Configuration dbConfig) {
// Debezium by default expects timezoned data delivered in server timezone
String connectionTimeZone = dbConfig.getString(JDBC_PROPERTY_CONNECTION_TIME_ZONE);
if (connectionTimeZone != null) {
return connectionTimeZone;
}
// fall back to legacy property
final String serverTimeZone = dbConfig.getString(JDBC_PROPERTY_LEGACY_SERVER_TIME_ZONE);
if (serverTimeZone != null) {
LOGGER.warn(
"Database configuration option '{}' is set but is obsolete, please use '{}' instead",
JDBC_PROPERTY_LEGACY_SERVER_TIME_ZONE,
JDBC_PROPERTY_CONNECTION_TIME_ZONE);
connectionTimeZone = serverTimeZone;
}
return connectionTimeZone != null ? connectionTimeZone : "SERVER";
}
public JdbcConfiguration config() {
return jdbcConfig;
}
public Configuration originalConfig() {
return config;
}
public ConnectionFactory factory() {View on GitHub (pinned to cf67b549a7)