{"record":{"id":"b0d4636d2e3be56b","repo":"quarkusio/quarkus","slug":"unknown-semantics","errorCode":null,"errorMessage":"Unknown semantics","messagePattern":"Unknown semantics","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/QuarkusTransactionImpl.java","lineNumber":37,"sourceCode":"\nclass QuarkusTransactionImpl {\n\n    private static final Logger log = Logger.getLogger(QuarkusTransactionImpl.class);\n    private static TransactionManager cachedTransactionManager;\n    private static UserTransaction cachedUserTransaction;\n\n    public static <T> T call(RunOptionsBase options, Callable<T> task) {\n        switch (options.semantics) {\n            case REQUIRE_NEW:\n                return callRequireNew(options, task);\n            case DISALLOW_EXISTING:\n                return callDisallowExisting(options, task);\n            case JOIN_EXISTING:\n                return callJoinExisting(options, task);\n            case SUSPEND_EXISTING:\n                return callSuspendExisting(options, task);\n        }\n        throw new IllegalArgumentException(\"Unknown semantics\");\n    }\n\n    private static <T> T callSuspendExisting(RunOptionsBase options, Callable<T> task) {\n        if (options.exceptionHandler != null) {\n            throw new IllegalStateException(\"Cannot specify both an exception handler and SUSPEND_EXISTING\");\n        }\n        TransactionManager transactionManager = getTransactionManager();\n        Transaction transaction = null;\n        try {\n            if (isTransactionActive()) {\n                transaction = transactionManager.suspend();\n            }\n            T result = task.call();\n            if (transaction != null) {\n                try {\n                    transactionManager.resume(transaction);\n                    transaction = null;\n                } catch (Exception e) {","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/QuarkusTransactionImpl.java#L19-L55","documentation":"QuarkusTransactionImpl.call switches on the transaction semantics enum and throws IllegalArgumentException(\"Unknown semantics\") as a catch-all if the TransactionSemantics value is not one of the handled cases (REQUIRED, REQUIRES_NEW, etc.). This indicates a semantics value the implementation does not recognize — usually a new/unknown enum constant or corrupted dispatch.","triggerScenarios":"Invoking QuarkusTransaction.call/run with a TransactionSemantics that the switch statement does not cover; only possible via a non-standard enum value or if the implementation lags a newly added enum constant.","commonSituations":"Library version mismatch where an extension passes a newer enum constant to an older QuarkusTransactionImpl; reflection/proxy-based invocation passing null or unhandled semantics.","solutions":["Use one of the documented TransactionSemantics values (REQUIRED, REQUIRES_NEW, SUPPORTS, MANDATORY, NEVER, NOT_SUPPORTED, JOIN_EXISTING, SUSPEND_EXISTING, DISALLOW_EXISTING)","Align extension and Quarkus versions so enum and implementation match","Check for null semantics being passed (add explicit null handling in caller)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Objects.requireNonNull(semantics, \"TransactionSemantics must not be null\");\nif (!KNOWN_SEMANTICS.contains(semantics)) {\n    throw new IllegalArgumentException(\"Unsupported semantics: \" + semantics);\n}","typeGuard":null,"tryCatchPattern":"try {\n    QuarkusTransaction.call(runOptions, task);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().equals(\"Unknown semantics\")) {\n        log.error(\"Check TransactionSemantics value and Quarkus version alignment\");\n    }\n    throw e;\n}","preventionTips":["Only pass enum constants from the same Quarkus version's TransactionSemantics","Keep Quarkus extensions and core versions aligned","Avoid reflective construction of RunOptions with raw enum values"],"tags":["narayana","transaction","illegal-argument","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}