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

  1. Rename the option: replace serverTimezone with connectionTimeZone in the JDBC properties.
  2. Set the value to the MySQL server's actual time zone (e.g. 'UTC', 'Asia/Shanghai').
  3. Remove the legacy serverTimezone entry to silence the warning.
  4. 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

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


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)