{"record":{"id":"da46cda7a149f981","repo":"apache/seatunnel","slug":"optionvalidationexception-e-getmessage","errorCode":null,"errorMessage":"OptionValidationException(e.getMessage())","messagePattern":"OptionValidationException\\(e\\.getMessage\\(\\)\\)","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcTableOptionsConditionExtension.java","lineNumber":54,"sourceCode":"\n    private JdbcTableOptionsConditionExtension() {}\n\n    @Override\n    public String description() {\n        return \"must use dialect-specific keys supported by the JDBC sink (see JDBC connector docs)\";\n    }\n\n    @Override\n    public boolean evaluate(ReadonlyConfig config, Map<String, String> value)\n            throws OptionValidationException {\n        if (value == null || value.isEmpty()) {\n            return true;\n        }\n        try {\n            JdbcTableOptionsValidator.validate(config, value);\n            return true;\n        } catch (JdbcConnectorException e) {\n            throw new OptionValidationException(e.getMessage());\n        }\n    }\n}\n","sourceCodeStart":36,"sourceCodeEnd":58,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcTableOptionsConditionExtension.java#L36-L58","documentation":"JdbcTableOptionsConditionExtension.evaluate delegates to JdbcTableOptionsValidator.validate and, if the validator raises JdbcConnectorException, re-wraps it as OptionValidationException with the same message. This normalizes JDBC table-option validation failures into the option-validation framework so config errors surface uniformly at job definition time.","triggerScenarios":"Validating a JDBC table sink/source config whose options fail JdbcTableOptionsValidator (e.g. incompatible option combinations for the given table/dialect); the validator throws JdbcConnectorException which is converted.","commonSituations":"Copy-pasted configs from another connector or dialect; option combinations valid in older SeaTunnel versions but rejected by newer validators; typos in option values that violate table-level constraints.","solutions":["Read the exception message — it carries the validator's original explanation of which options conflict.","Fix the offending JDBC table options in the config per the validator's requirement.","Consult the connector's option documentation for supported combinations for your dialect."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// pre-check table options against the connector docs before submitting\nReadonlyConfig cfg = ReadonlyConfig.fromMap(options);\nnew JdbcTableOptionsConditionExtension().evaluate(cfg, true); // throws early outside job","typeGuard":null,"tryCatchPattern":"try {\n  validateOptions(cfg);\n} catch (OptionValidationException e) {\n  // e.getMessage() mirrors the underlying JdbcConnectorException — fix options per message\n}","preventionTips":["Validate JDBC table options in unit tests before production runs","Keep option combinations aligned with the dialect in use","Track connector upgrade notes for changed validators"],"tags":["jdbc","config-validation","options"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}