{"record":{"id":"4714a4469e8b72f8","repo":"apache/seatunnel","slug":"error-processing-table-path-with-regex","errorCode":null,"errorMessage":"Error processing table path with regex: {}","messagePattern":"Error processing table path with regex: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java","lineNumber":593,"sourceCode":"                JdbcSourceTable jdbcSourceTable =\n                        JdbcSourceTable.builder()\n                                .tablePath(path)\n                                .partitionColumn(tableConfig.getPartitionColumn())\n                                .partitionNumber(tableConfig.getPartitionNumber())\n                                .partitionStart(tableConfig.getPartitionStart())\n                                .partitionEnd(tableConfig.getPartitionEnd())\n                                .useSelectCount(tableConfig.getUseSelectCount())\n                                .skipAnalyze(tableConfig.getSkipAnalyze())\n                                .catalogTable(catalogTable)\n                                .build();\n\n                result.put(path, jdbcSourceTable);\n                log.info(\"Found table matching regex pattern: {}\", path);\n            }\n\n            log.info(\"Found {} tables matching regex pattern: {}\", catalogTables.size(), tablePath);\n        } catch (Exception e) {\n            log.warn(\"Error processing table path with regex: {}\", tablePath, e);\n            throw new SQLException(\"Failed to process regex table path: \" + tablePath, e);\n        }\n    }\n}\n","sourceCodeStart":575,"sourceCodeEnd":598,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java#L575-L598","documentation":"Logged by JdbcCatalogUtils.processRegexTablePath when matching a configured table path against its regex fails or the matched groups cannot be processed — the regex-style table name in the JDBC source config is the input at fault.","triggerScenarios":"Any exception inside regex resolution — catalog getTables call fails (connection error, SQL error querying metadata), or building a JdbcSourceTable from a matched catalogTable throws; processRegexTablePath wraps it in \"Failed to process regex table path: <path>\".","commonSituations":"Database unreachable or credentials invalid when the catalog queries metadata; unsupported dialect for the URL; metadata query fails due to permissions; transient network failure during discovery.","solutions":["Inspect the chained SQLException cause logged with the warning","Verify connectivity and credentials to the database used for metadata queries","Confirm the JDBC dialect/plugin supports the database and its metadata queries","Retry if the cause is transient, or remove the failing regex path from table config"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Confirm connectivity and metadata access before job submission\ntry (Connection c = DriverManager.getConnection(url, user, pass)) {\n    c.getMetaData().getTables(); // throws early if metadata queries fail\n}","typeGuard":null,"tryCatchPattern":"try {\n    List<CatalogTable> tables = JdbcCatalogUtils.getTables(...);\n} catch (SQLException e) {\n    // cause chain carries the original metadata failure\n    Throwable root = e.getCause();\n    LOG.error(\"Regex table path discovery failed\", root);\n    // retry or abort depending on root cause (connectivity vs config)\n}","preventionTips":["Pre-check DB connectivity and credentials before discovery","Verify the dialect supports the target database's metadata queries","Add retry for transient network errors during discovery"],"tags":["jdbc","regex","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-23T08:17:48.524Z"}