{"record":{"id":"7d7ac60d9e3075f3","repo":"prestodb/presto","slug":"incompatible-client","errorCode":"INCOMPATIBLE_CLIENT","errorMessage":"Client does not support transactions","messagePattern":"Client does not support transactions","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/execution/StartTransactionTask.java","lineNumber":51,"sourceCode":"\nimport static com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_TRANSACTION_MODE;\nimport static com.google.common.util.concurrent.Futures.immediateFuture;\n\npublic class StartTransactionTask\n        implements SessionTransactionControlTask<StartTransaction>\n{\n    @Override\n    public String getName()\n    {\n        return \"START TRANSACTION\";\n    }\n\n    @Override\n    public ListenableFuture<?> execute(StartTransaction statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters, String query)\n    {\n        Session session = stateMachine.getSession();\n        if (!session.isClientTransactionSupport()) {\n            throw new PrestoException(StandardErrorCode.INCOMPATIBLE_CLIENT, \"Client does not support transactions\");\n        }\n        if (session.getTransactionId().isPresent()) {\n            throw new PrestoException(StandardErrorCode.NOT_SUPPORTED, \"Nested transactions not supported\");\n        }\n\n        Optional<IsolationLevel> isolationLevel = extractIsolationLevel(statement);\n        Optional<Boolean> readOnly = extractReadOnly(statement);\n\n        TransactionId transactionId = transactionManager.beginTransaction(\n                isolationLevel.orElse(TransactionManager.DEFAULT_ISOLATION),\n                readOnly.orElse(TransactionManager.DEFAULT_READ_ONLY),\n                false);\n\n        stateMachine.setStartedTransactionId(transactionId);\n\n        // Since the current session does not contain this new transaction ID, we need to manually mark it as inactive\n        // when this statement completes.\n        transactionManager.trySetInactive(transactionId);","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/execution/StartTransactionTask.java#L33-L69","documentation":"START TRANSACTION requires the client protocol to support transaction handling (the client must be able to hold and pass the transaction ID). If the session does not declare client transaction support, Presto rejects the statement with INCOMPATIBLE_CLIENT.","triggerScenarios":"Executing START TRANSACTION (or an autocommit=false path invoking StartTransactionTask) from a session whose client did not advertise transaction support (session.isClientTransactionSupport() is false).","commonSituations":"Using an old CLI/JDBC driver or a client that doesn't implement the transaction protocol, running START TRANSACTION through a tool that strips transaction headers, or connecting via HTTP without the transaction-capable client tag.","solutions":["Upgrade the client (CLI/JDBC/ODBC driver) to a version supporting transactions.","Remove explicit START TRANSACTION statements and rely on implicit transaction handling.","Ensure the client sets the X-Presto-Started-Transaction-Id / client transaction capability headers.","Verify connection properties (e.g. JDBC) enable transaction support."],"exampleFix":"// before (old driver)\nstmt.execute(\"START TRANSACTION\");\n// after\n// upgrade to a transaction-capable driver, or drop the explicit START TRANSACTION","handlingStrategy":"validation","validationCode":"// before issuing START TRANSACTION, check the driver/client supports transactions\nboolean supported = connection.getMetaData().supportsTransactions();","typeGuard":null,"tryCatchPattern":"// catch PrestoException with errorCode INCOMPATIBLE_CLIENT; upgrade the driver or fall back to autocommit mode","preventionTips":["Pin to a JDBC/CLI driver version that supports Presto transactions","Avoid explicit START TRANSACTION in tools without transaction protocol support","Document transaction-support requirements for client integrations"],"tags":["transactions","client-compatibility","protocol"],"backgroundTag":"client-does-not-support-transactions","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}