{"record":{"id":"bd9b576501b52e30","repo":"quarkusio/quarkus","slug":"unknown-transaction-phase","errorCode":null,"errorMessage":"Unknown transaction phase ","messagePattern":"Unknown transaction phase ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java","lineNumber":592,"sourceCode":"         * matches this status.\n         *\n         * @param status the given status code\n         * @return true if the status code matches\n         */\n        public abstract boolean matches(int status);\n\n        public static Status valueOf(TransactionPhase transactionPhase) {\n            if (transactionPhase == TransactionPhase.BEFORE_COMPLETION\n                    || transactionPhase == TransactionPhase.AFTER_COMPLETION) {\n                return Status.ALL;\n            }\n            if (transactionPhase == TransactionPhase.AFTER_SUCCESS) {\n                return Status.SUCCESS;\n            }\n            if (transactionPhase == TransactionPhase.AFTER_FAILURE) {\n                return Status.FAILURE;\n            }\n            throw new IllegalArgumentException(\"Unknown transaction phase \" + transactionPhase);\n        }\n\n    }\n\n    /**\n     * There are two different strategies of exception handling for observer methods. When an exception is raised by a\n     * synchronous or transactional observer for\n     * a synchronous event, this exception stops the notification chain and the exception is propagated immediately. On the\n     * other hand, an exception thrown\n     * during asynchronous event delivery is never propagated directly. Instead, all the exceptions for a given\n     * asynchronous event are collected and then\n     * made available together using CompletionException.\n     *\n     * @author Jozef Hartinger\n     *\n     */\n    protected interface ObserverExceptionHandler {\n","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java#L574-L610","documentation":"ArC's EventImpl supports transactional observers (TransactionPhase.IN_PROGRESS, BEFORE_COMPLETION, AFTER_COMPLETION, AFTER_SUCCESS, AFTER_FAILURE). Internally each phase maps to a status enum; if an unknown phase value arrives, IllegalArgumentException('Unknown transaction phase ...') is thrown. This is a defensive check and normally indicates a new/unknown enum constant or corrupted wiring rather than user code error.","triggerScenarios":"Constructing an EventImpl (or using the event transaction-phase mapping code path) with a TransactionPhase value not handled by the switch — practically only when a TransactionPhase constant is added upstream without updating this mapping, or a custom/foreign TransactionPhase enum is passed programmatically.","commonSituations":"Version mismatch between the ArC runtime and code compiled against a newer jakarta.transaction/CDI TransactionPhase; custom event implementations forwarding an unsupported phase.","solutions":["Upgrade or align the Quarkus/ArC version so EventImpl and TransactionPhase come from the same release","Check that no dependency provides a conflicting javax/jakarta.transaction.TransactionPhase on the classpath","If implementing custom event machinery, handle all TransactionPhase constants in your mapping"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Only valid phases\nSet<TransactionPhase> VALID = Set.of(TransactionPhase.IN_PROGRESS, TransactionPhase.BEFORE_COMPLETION,\n    TransactionPhase.AFTER_COMPLETION, TransactionPhase.AFTER_SUCCESS, TransactionPhase.AFTER_FAILURE);\nif (!VALID.contains(phase)) throw new IllegalArgumentException(\"Unsupported phase: \" + phase);","typeGuard":null,"tryCatchPattern":"try {\n    new EventImpl<>(type, qualifiers, ip, phase, ...);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unknown transaction phase\")) {\n        throw new IllegalStateException(\"TransactionPhase mapping out of sync with ArC runtime\", e);\n    }\n    throw e;\n}","preventionTips":["Keep Quarkus/ArC runtime and API versions aligned in the same BOM","Do not vendor or shadow TransactionPhase from different Jakarta versions","If writing custom event plumbing, switch over all TransactionPhase constants and add a default throw"],"tags":["cdi","arc","transactions","events"],"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-12T22:17:10.623Z"}