{"record":{"id":"6412f558665e8d48","repo":"hibernate/hibernate-orm","slug":"jta-transactionmanager-getstatus-failed","errorCode":null,"errorMessage":"JTA TransactionManager#getStatus failed","messagePattern":"JTA TransactionManager#getStatus failed","errorType":"exception","errorClass":"TransactionException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionAdapterTransactionManagerImpl.java","lineNumber":96,"sourceCode":"\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new TransactionException( \"JTA TransactionManager.rollback() failed\", e );\n\t\t}\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic TransactionStatus getStatus() {\n\t\ttry {\n\t\t\tfinal var status = StatusTranslator.translate( transactionManager.getStatus() );\n\t\t\tif ( status == null ) {\n\t\t\t\tthrow new TransactionException( \"TransactionManager reported transaction status as unknown\" );\n\t\t\t}\n\t\t\treturn status;\n\t\t}\n\t\tcatch (SystemException e) {\n\t\t\tthrow new TransactionException( \"JTA TransactionManager#getStatus failed\", e );\n\t\t}\n\t}\n\n\t@Override\n\tpublic void markRollbackOnly() {\n\t\ttry {\n\t\t\ttransactionManager.setRollbackOnly();\n\t\t}\n\t\tcatch (SystemException e) {\n\t\t\tthrow new TransactionException( \"Could not set transaction to rollback only\", e );\n\t\t}\n\t}\n\n\t@Override\n\tpublic void setTimeOut(int seconds) {\n\t\tif ( seconds > 0 ) {\n\t\t\ttry {\n\t\t\t\ttransactionManager.setTransactionTimeout( seconds );","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionAdapterTransactionManagerImpl.java#L78-L114","documentation":"TransactionManager.getStatus() itself threw SystemException, which the adapter wraps as 'JTA TransactionManager#getStatus failed'. Hibernate cannot determine transaction state at all in this case; it is nearly always a symptom of a broken, stopped or corrupt TransactionManager rather than of a specific transaction. Reached from any Transaction API path that reads status (begin()'s NOT_ACTIVE check, getStatus()).","triggerScenarios":"Any Transaction call that reads status - begin(), getStatus(), the rollback/markRollbackOnly guards - while the TM throws SystemException from getStatus(): TM shut down, JtaPlatform resolving a dead JNDI resource, or TM corruption after a crash.","commonSituations":"TM stopped or failed; wrong JNDI lookup name in the JtaPlatform; severe resource exhaustion or TM store corruption.","solutions":["Read the wrapped SystemException and TM logs; fix the TM-level failure first","Verify the JtaPlatform and JNDI wiring point at the container's live TransactionManager","Restart or recover the TM/application when it is in a terminal state"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Health-check the TM before relying on transactions\ntry {\n    transactionManager.getStatus();\n}\ncatch (SystemException e) {\n    throw new IllegalStateException(\"TransactionManager is not usable\", e);\n}","typeGuard":null,"tryCatchPattern":"catch (TransactionException e) {\n    if ( e.getCause() instanceof SystemException ) {\n        // TM-level failure: fail the request and surface environment health\n    }\n}","preventionTips":["Smoke-test the TransactionManager at startup","Verify JtaPlatform JNDI configuration against the actual container","Alert on repeated SystemException from the TM before it becomes an outage"],"tags":["jta","transactions","hibernate","transaction-manager"],"backgroundTag":"transaction-status-check-failed","analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}