apache/seatunnel · critical · DebeziumException

Cannot get maximum archive log SCN as no logs were available

Error message

Cannot get maximum archive log SCN as no logs were available.

What it means

getMaxArchiveLogScn computes the maximum SCN among the redo/archive log files discovered during mining session setup, used to derive currentScn. If the supplied logFiles list is null or empty, there is no data to compute from, so the connector throws this DebeziumException. It indicates Oracle reported no log files at all at the point the mining session was prepared.

Source

Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/io/debezium/connector/oracle/logminer/LogMinerStreamingChangeEventSource.java:474

            return Collections.emptyList();
        }
        return logFiles.stream()
                .filter(LogFile::isCurrent)
                .map(LogFile::getSequence)
                .collect(Collectors.toList());
    }

    /**
     * Get the maximum archive log SCN
     *
     * @param logFiles the current logs that are part of the mining session
     * @return the maximum system change number from the archive logs
     * @throws DebeziumException if no logs are provided or if the provided logs has no archive log
     *     types
     */
    private Scn getMaxArchiveLogScn(List<LogFile> logFiles) {
        if (logFiles == null || logFiles.isEmpty()) {
            throw new DebeziumException(
                    "Cannot get maximum archive log SCN as no logs were available.");
        }

        final List<LogFile> archiveLogs =
                logFiles.stream()
                        .filter(log -> log.getType().equals(LogFile.Type.ARCHIVE))
                        .collect(Collectors.toList());

        if (archiveLogs.isEmpty()) {
            throw new DebeziumException(
                    "Cannot get maximum archive log SCN as no archive logs are present.");
        }

        Scn maxScn = archiveLogs.get(0).getNextScn();
        for (int i = 1; i < archiveLogs.size(); ++i) {
            Scn nextScn = archiveLogs.get(i).getNextScn();
            if (nextScn.compareTo(maxScn) > 0) {
                maxScn = nextScn;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Confirm ARCHIVELOG mode is enabled and archiving is actively producing logs (ARCHIVE LOG LIST; V$ARCHIVED_LOG).
  2. Verify the log/discovery queries return rows for the configured archive destination and retention window.
  3. Fix archiveDestinationName / archiveLogRetention connector options to match the actual V$ARCHIVE_DEST configuration.
  4. Force a log switch and archive (ALTER SYSTEM SWITCH LOGFILE;) so at least one archived log exists, then restart the connector.

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

-- ensure at least one archived log exists before starting
SELECT COUNT(*) FROM V$ARCHIVED_LOG; -- must be > 0
ARCHIVE LOG LIST; -- Database log mode: Archive Mode

Prevention

When it happens

Trigger: Called from currentScn after queryRedoLogFiles returns null or an empty List<LogFile> — e.g. the V$ARCHIVED_LOG / V$LOG query produced no rows for the configured destination and time window.

Common situations: Archive destination name typo so no logs are discovered; database switched to NOARCHIVELOG mode; very fresh database with no archived logs yet; insufficient privileges returning empty dictionary views.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/3ee269380ad796b2. Report an issue: GitHub.