{"record":{"id":"a8c69cd00ad3adc6","repo":"apache/seatunnel","slug":"error-reading-oracle-variables-e-getmessage","errorCode":null,"errorMessage":"Error reading oracle variables: ${e.getMessage()}","messagePattern":"Error reading oracle variables: (.+?)","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/OracleDialect.java","lineNumber":78,"sourceCode":"            OracleSourceConfigFactory configFactory, List<CatalogTable> catalogTables) {\n        this.configFactory = configFactory;\n        this.sourceConfig = configFactory.create(0);\n        this.tableMap = CatalogTableUtils.convertTables(catalogTables);\n    }\n\n    @Override\n    public String getName() {\n        return \"Oracle\";\n    }\n\n    @SuppressWarnings(\"checkstyle:MagicNumber\")\n    @Override\n    public boolean isDataCollectionIdCaseSensitive(JdbcSourceConfig sourceConfig) {\n        try (JdbcConnection jdbcConnection = openJdbcConnection(sourceConfig)) {\n            OracleConnection oracleConnection = (OracleConnection) jdbcConnection;\n            return oracleConnection.getOracleVersion().getMajor() == 11;\n        } catch (SQLException e) {\n            throw new SeaTunnelException(\"Error reading oracle variables: \" + e.getMessage(), e);\n        }\n    }\n\n    @Override\n    public JdbcConnection openJdbcConnection(JdbcSourceConfig sourceConfig) {\n        return createOracleConnection(sourceConfig.getDbzConnectorConfig().getJdbcConfig());\n    }\n\n    @Override\n    public ChunkSplitter createChunkSplitter(JdbcSourceConfig sourceConfig) {\n        return new OracleChunkSplitter(sourceConfig, this);\n    }\n\n    @Override\n    public List<TableId> discoverDataCollections(JdbcSourceConfig sourceConfig) {\n        OracleSourceConfig oracleSourceConfig = (OracleSourceConfig) sourceConfig;\n        String database = oracleSourceConfig.getDbzConnectorConfig().getDatabaseName();\n","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/OracleDialect.java#L60-L96","documentation":"OracleDialect.isDataCollectionIdCaseSensitive opens a JDBC connection to check whether the Oracle server is version 11 (which is case-sensitive for identifiers). If opening the connection or querying the Oracle version throws a SQLException, it is wrapped in a SeaTunnelException with this message, keeping the original cause.","triggerScenarios":"openJdbcConnection(sourceConfig) fails — bad host/port/service name, wrong credentials, network/firewall drop, driver missing — or OracleConnection.getOracleVersion() raises SQLException during the version probe.","commonSituations":"Database unreachable (listener down, VPN/security group blocks 1521), ORA-01017 invalid username/password, wrong database-list vs service name, or the Oracle JDBC driver being absent from the plugin directory.","solutions":["Check the root cause (the chained SQLException, e.g. 'Connection refused' or ORA- code) and fix connectivity or credentials in the source config.","Verify the Oracle listener is up: tnsping / test the URL host:port/service_name.","Confirm the ojdbc driver jar exists in the connector/plugin lib directory.","Retry after network/DBA fixes; the error itself is not retryable programmatically."],"exampleFix":"// before (connection fails)\nurl = \"jdbc:oracle:thin:@//wrong-host:1521/ORCL\"\n// after\nurl = \"jdbc:oracle:thin:@//db-host:1521/ORCLPDB1\"\nusername = \"dbzuser\"\npassword = \"***\"","handlingStrategy":"try-catch","validationCode":"// pre-flight connectivity check\ntry (java.sql.Connection c = java.sql.DriverManager.getConnection(url, user, pass)) {\n    c.createStatement().execute(\"SELECT 1 FROM DUAL\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    sourceFactory.create();\n} catch (org.apache.seatunnel.common.exception.SeaTunnelException e) {\n    if (e.getCause() instanceof java.sql.SQLException) {\n        java.sql.SQLException sql = (java.sql.SQLException) e.getCause();\n        // inspect vendorCode/message (ORA-01017, IO Error: Connection refused) and fix config\n    }\n    throw e;\n}","preventionTips":["Pre-flight the JDBC URL, credentials and listener before submitting the job.","Ship the Oracle JDBC driver with the connector and verify with a SELECT 1 FROM DUAL.","Never swallow the cause — it names the real ORA-/network error."],"tags":["oracle-cdc","jdbc","connection","sql-exception"],"backgroundTag":"database-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}