apache/seatunnel · warning
SQL execute error, sql:{}
Error message
SQL execute error, sql:{} What it means
OracleConnectionUtils.listTables() catches SQLException from the table-listing query and logs it at WARN level (' SQL execute error, sql:{}') instead of throwing. The method continues with whatever tables were collected before the failure, so the connector may silently capture a partial or empty table set.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/utils/OracleConnectionUtils.java:153
Set<TableId> tableIdSet = new HashSet<>();
String queryTablesSql =
"SELECT OWNER ,TABLE_NAME,TABLESPACE_NAME FROM ALL_TABLES \n"
+ "WHERE PARTITIONED = 'YES' OR (TABLESPACE_NAME IS NOT NULL AND TABLESPACE_NAME NOT IN ('SYSAUX'))";
try {
jdbcConnection.query(
queryTablesSql,
rs -> {
while (rs.next()) {
String schemaName = rs.getString(1);
String tableName = rs.getString(2);
TableId tableId = new TableId(database, schemaName, tableName);
tableIdSet.add(tableId);
}
});
} catch (SQLException e) {
LOG.warn(" SQL execute error, sql:{}", queryTablesSql, e);
}
for (TableId tableId : tableIdSet) {
if (tableFilters.dataCollectionFilter().isIncluded(tableId)) {
capturedTableIds.add(tableId);
LOG.info("\t including '{}' for further processing", tableId);
} else {
LOG.debug("\t '{}' is filtered out of capturing", tableId);
}
}
return capturedTableIds;
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Grant the CDC user SELECT on ALL_TABLES (or the relevant dictionary views) so the listing query succeeds.
- Verify Oracle connection parameters (url, user, database) and test the same query manually with the CDC account.
- Check network/firewall stability between the SeaTunnel worker and Oracle; retry the job after connectivity is restored.
- Review the WARN stack trace for the exact ORA- error code and fix the underlying cause.
Defensive patterns
Strategy: validation
Validate before calling
// before starting the job, verify the CDC user can list tables
try (Connection c = DriverManager.getConnection(url, user, pass);
PreparedStatement ps = c.prepareStatement("SELECT COUNT(*) FROM ALL_TABLES WHERE OWNER = ?")) {
ps.setString(1, schema);
try (ResultSet rs = ps.executeQuery()) {
rs.next(); // succeeds only if dictionary access is granted
}
} Prevention
- Grant SELECT on ALL_TABLES / dictionary views to the CDC user
- Validate Oracle connectivity and credentials before job start
- Monitor for this WARN at startup — a partial table list silently narrows captured tables
- Log and compare the discovered table set against expected tables
When it happens
Trigger: The query used to enumerate Oracle tables (against ALL_TABLES / dba views) throws SQLException: connection dropped, ORA-00942 insufficient privileges on dictionary views, or DB temporarily unavailable during table discovery.
Common situations: CDC user lacks SELECT privilege on the data dictionary views; network blip to Oracle during job startup; wrong database/service name in connection config causing the listing query to fail.
Understand the failure class
Background: "query failed", "%w: SQL error" — wrapped database query errors in Go libraries explained — this error's family across 3 libraries.
Related errors
- \t skipping database '{}' due to error reading tables: {}
- \t skipping database '{}' due to error reading tables: {}
- Error to discover tables:
- Failed to discover captured tables for enumerator
- Failed to discover remaining tables to capture
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/93342edabeae94b5.
Report an issue: GitHub.