{"record":{"id":"3ee269380ad796b2","repo":"apache/seatunnel","slug":"cannot-get-maximum-archive-log-scn-as-no-logs-were","errorCode":null,"errorMessage":"Cannot get maximum archive log SCN as no logs were available.","messagePattern":"Cannot get maximum archive log SCN as no logs were available\\.","errorType":"exception","errorClass":"DebeziumException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/io/debezium/connector/oracle/logminer/LogMinerStreamingChangeEventSource.java","lineNumber":474,"sourceCode":"            return Collections.emptyList();\n        }\n        return logFiles.stream()\n                .filter(LogFile::isCurrent)\n                .map(LogFile::getSequence)\n                .collect(Collectors.toList());\n    }\n\n    /**\n     * Get the maximum archive log SCN\n     *\n     * @param logFiles the current logs that are part of the mining session\n     * @return the maximum system change number from the archive logs\n     * @throws DebeziumException if no logs are provided or if the provided logs has no archive log\n     *     types\n     */\n    private Scn getMaxArchiveLogScn(List<LogFile> logFiles) {\n        if (logFiles == null || logFiles.isEmpty()) {\n            throw new DebeziumException(\n                    \"Cannot get maximum archive log SCN as no logs were available.\");\n        }\n\n        final List<LogFile> archiveLogs =\n                logFiles.stream()\n                        .filter(log -> log.getType().equals(LogFile.Type.ARCHIVE))\n                        .collect(Collectors.toList());\n\n        if (archiveLogs.isEmpty()) {\n            throw new DebeziumException(\n                    \"Cannot get maximum archive log SCN as no archive logs are present.\");\n        }\n\n        Scn maxScn = archiveLogs.get(0).getNextScn();\n        for (int i = 1; i < archiveLogs.size(); ++i) {\n            Scn nextScn = archiveLogs.get(i).getNextScn();\n            if (nextScn.compareTo(maxScn) > 0) {\n                maxScn = nextScn;","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/io/debezium/connector/oracle/logminer/LogMinerStreamingChangeEventSource.java#L456-L492","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Confirm ARCHIVELOG mode is enabled and archiving is actively producing logs (ARCHIVE LOG LIST; V$ARCHIVED_LOG).","Verify the log/discovery queries return rows for the configured archive destination and retention window.","Fix archiveDestinationName / archiveLogRetention connector options to match the actual V$ARCHIVE_DEST configuration.","Force a log switch and archive (ALTER SYSTEM SWITCH LOGFILE;) so at least one archived log exists, then restart the connector."],"exampleFix":"null","handlingStrategy":"validation","validationCode":"-- ensure at least one archived log exists before starting\nSELECT COUNT(*) FROM V$ARCHIVED_LOG; -- must be > 0\nARCHIVE LOG LIST; -- Database log mode: Archive Mode","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable ARCHIVELOG mode and verify archiving is producing files","Run ALTER SYSTEM SWITCH LOGFILE; after enabling archiving before starting the connector","Check the discovery query's destination/retention filters against V$ARCHIVE_DEST"],"tags":["oracle","cdc","logminer","archived-log","scn"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}