{"record":{"id":"5e97e4a1da4739c9","repo":"redisson/redisson","slug":"not-in-transaction-mode-please-invoke-multi-metho-5e97e4","errorCode":null,"errorMessage":"Not in transaction mode. Please invoke multi method","messagePattern":"Not in transaction mode\\. Please invoke multi method","errorType":"exception","errorClass":"InvalidDataAccessApiUsageException","httpStatus":null,"severity":"error","filePath":"redisson-spring/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java","lineNumber":1638,"sourceCode":"    }\n\n    @Override\n    public List<Object> exec() {\n        if (isPipelinedAtomic()) {\n            return null;\n        }\n        if (isQueueing()) {\n            try {\n                BatchResult<?> result = ((CommandBatchService)executorService).execute();\n                filterResults(result);\n                return (List<Object>) result.getResponses();\n            } catch (Exception ex) {\n                throw transform(ex);\n            } finally {\n                resetConnection();\n            }\n        } else {\n            throw new InvalidDataAccessApiUsageException(\"Not in transaction mode. Please invoke multi method\");\n        }\n    }\n\n    protected void filterResults(BatchResult<?> result) {\n        if (result.getResponses().isEmpty()) {\n            return;\n        }\n\n        int t = 0;\n        for (Integer index : indexToRemove) {\n            index -= t;\n            result.getResponses().remove((int)index);\n            t++;\n        }\n        for (ListIterator<Object> iterator = (ListIterator<Object>) result.getResponses().listIterator(); iterator.hasNext();) {\n            Object object = iterator.next();\n            if (object instanceof String) {\n                iterator.set(((String) object).getBytes());","sourceCodeStart":1620,"sourceCodeEnd":1656,"githubUrl":"https://github.com/redisson/redisson/blob/91188987c2a9023e7fedabff758681ad9b107f25/redisson-spring/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java#L1620-L1656","documentation":"Error \"Not in transaction mode. Please invoke multi method\" thrown in redisson/redisson.","triggerScenarios":"Thrown when exec() is invoked without a preceding multi() call, i.e. the connection is not in transaction mode.","commonSituations":"See trigger scenarios.","solutions":["Call connection.multi() before executing commands intended for the transaction, and finish with exec() or discard().","Check that the same connection instance that started the transaction is used for exec/discard."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"91188987c2a9023e7fedabff758681ad9b107f25","analyzedAt":"2026-08-14T11:39:42.619Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}