apache/seatunnel · error · SeaTunnelException
Error reading oracle variables: ${e.getMessage()}
Error message
Error reading oracle variables: ${e.getMessage()} What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/OracleDialect.java:78
OracleSourceConfigFactory configFactory, List<CatalogTable> catalogTables) {
this.configFactory = configFactory;
this.sourceConfig = configFactory.create(0);
this.tableMap = CatalogTableUtils.convertTables(catalogTables);
}
@Override
public String getName() {
return "Oracle";
}
@SuppressWarnings("checkstyle:MagicNumber")
@Override
public boolean isDataCollectionIdCaseSensitive(JdbcSourceConfig sourceConfig) {
try (JdbcConnection jdbcConnection = openJdbcConnection(sourceConfig)) {
OracleConnection oracleConnection = (OracleConnection) jdbcConnection;
return oracleConnection.getOracleVersion().getMajor() == 11;
} catch (SQLException e) {
throw new SeaTunnelException("Error reading oracle variables: " + e.getMessage(), e);
}
}
@Override
public JdbcConnection openJdbcConnection(JdbcSourceConfig sourceConfig) {
return createOracleConnection(sourceConfig.getDbzConnectorConfig().getJdbcConfig());
}
@Override
public ChunkSplitter createChunkSplitter(JdbcSourceConfig sourceConfig) {
return new OracleChunkSplitter(sourceConfig, this);
}
@Override
public List<TableId> discoverDataCollections(JdbcSourceConfig sourceConfig) {
OracleSourceConfig oracleSourceConfig = (OracleSourceConfig) sourceConfig;
String database = oracleSourceConfig.getDbzConnectorConfig().getDatabaseName();
View on GitHub (pinned to cf67b549a7)
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.
Example fix
// before (connection fails) url = "jdbc:oracle:thin:@//wrong-host:1521/ORCL" // after url = "jdbc:oracle:thin:@//db-host:1521/ORCLPDB1" username = "dbzuser" password = "***"
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight connectivity check
try (java.sql.Connection c = java.sql.DriverManager.getConnection(url, user, pass)) {
c.createStatement().execute("SELECT 1 FROM DUAL");
} Try / catch
try {
sourceFactory.create();
} catch (org.apache.seatunnel.common.exception.SeaTunnelException e) {
if (e.getCause() instanceof java.sql.SQLException) {
java.sql.SQLException sql = (java.sql.SQLException) e.getCause();
// inspect vendorCode/message (ORA-01017, IO Error: Connection refused) and fix config
}
throw e;
} Prevention
- 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.
When it happens
Trigger: openJdbcConnection(sourceConfig) fails — bad host/port/service name, wrong credentials, network/firewall drop, driver missing — or OracleConnection.getOracleVersion() raises SQLException during the version probe.
Common situations: 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.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Failed to get the JDBC source connection from the current st
- Failed to get connection, interrupted while doing another at
- Get connection failed after retry times
- Failed to discover remaining tables to capture
- Error to check tables:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a8c69cd00ad3adc6.
Report an issue: GitHub.