{"record":{"id":"c1d79dd2b5bfc726","repo":"apache/seatunnel","slug":"common-unsupported-operation-c1d79d","errorCode":"COMMON_UNSUPPORTED_OPERATION","errorMessage":"The instance failed to implement this method","messagePattern":"The instance failed to implement this method","errorType":"error_code","errorClass":"JdbcConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/xa/XaFacadeImplAutoLoad.java","lineNumber":173,"sourceCode":"    public Connection getOrEstablishConnection() throws SQLException {\n        if (!isOpen()) {\n            open();\n        }\n        return connection;\n    }\n\n    @Override\n    public void closeConnection() {\n        try {\n            close();\n        } catch (SQLException e) {\n            LOG.warn(\"Connection close failed.\", e);\n        }\n    }\n\n    @Override\n    public Connection reestablishConnection() {\n        throw new JdbcConnectorException(\n                CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,\n                \"The instance failed to implement this method\");\n    }\n\n    @Override\n    public void start(Xid xid) {\n        execute(Command.fromRunnable(\"start\", xid, () -> xaResource.start(xid, TMNOFLAGS)));\n    }\n\n    @Override\n    public void endAndPrepare(Xid xid) {\n        execute(Command.fromRunnable(\"end\", xid, () -> xaResource.end(xid, XAResource.TMSUCCESS)));\n        int prepResult = execute(new Command<>(\"prepare\", of(xid), () -> xaResource.prepare(xid)));\n        if (prepResult == XAResource.XA_RDONLY) {\n            throw new JdbcConnectorException(\n                    JdbcConnectorErrorCode.XA_OPERATION_FAILED,\n                    new EmptyXaTransactionException(xid));\n        } else if (prepResult != XAResource.XA_OK) {","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/xa/XaFacadeImplAutoLoad.java#L155-L191","documentation":"XaFacadeImplAutoLoad does not support re-establishing a broken physical connection: reestablishConnection is intentionally unimplemented and always throws UNSUPPORTED_OPERATION. XA connections must be recovered through the XA protocol rather than silently reconnected.","triggerScenarios":"Any code path (typically the recovery/reconnect logic in the XA group operations after a network failure) invokes reestablishConnection() on the auto-load XA facade instance.","commonSituations":"Long-running exactly-once sink jobs whose XA connection drops mid-transaction; failover of the database node during a checkpoint; calling the facade API directly in custom code.","solutions":["Close and recreate the whole XaFacade (call close() then open()) instead of calling reestablishConnection.","Rely on the engine's checkpoint restart: fail the task so it restarts with a fresh facade.","Update SeaTunnel if a newer version implements connection re-establishment for this facade.","Reduce transient disconnects (idle keepalive, network stability) to avoid reaching this code path."],"exampleFix":"// before\nxaFacade.reestablishConnection();\n// after\nxaFacade.close();\nxaFacade.open();","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  xaFacade.reestablishConnection();\n} catch (JdbcConnectorException e) {\n  if (CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION.equals(e.getErrorCode())) {\n    xaFacade.close();\n    xaFacade.open(); // rebuild the facade instead\n  }\n}","preventionTips":["Never call reestablishConnection on the auto-load XA facade; recreate the facade instead.","Design job recovery around checkpoint restarts rather than in-place reconnection.","Keep connections alive (keepalive/idle settings) to reduce dropped XA connections.","Check newer SeaTunnel versions for implemented reconnection support."],"tags":["jdbc","xa","reconnect"],"backgroundTag":"method-not-implemented","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"}