hibernate/hibernate-orm · error · TransactionException
TransactionManager reported transaction status as unknown
Error message
TransactionManager reported transaction status as unknown
What it means
The adapter maps the JTA Status int to Hibernate's TransactionStatus via StatusTranslator; a null mapping means the TransactionManager reported a status Hibernate cannot translate - typically Status.STATUS_UNKNOWN or an unrecognized value. It is raised from the adapter's status reads (including begin()'s NOT_ACTIVE check) and means the TM cannot tell what state the transaction is in, usually after an internal TM error or while recovery is in progress.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionAdapterTransactionManagerImpl.java:91
transactionManager.rollback();
JTA_LOGGER.calledTransactionManagerRollback();
}
else {
markRollbackOnly();
}
}
catch (Exception e) {
throw new TransactionException( "JTA TransactionManager.rollback() failed", e );
}
}
@Override
@Nonnull
public TransactionStatus getStatus() {
try {
final var status = StatusTranslator.translate( transactionManager.getStatus() );
if ( status == null ) {
throw new TransactionException( "TransactionManager reported transaction status as unknown" );
}
return status;
}
catch (SystemException e) {
throw new TransactionException( "JTA TransactionManager#getStatus failed", e );
}
}
@Override
public void markRollbackOnly() {
try {
transactionManager.setRollbackOnly();
}
catch (SystemException e) {
throw new TransactionException( "Could not set transaction to rollback only", e );
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Check TransactionManager logs - an earlier TM-level error usually explains the unknown status
- Let crash recovery finish, or restart the TM, before further transaction work
- Upgrade the JTA implementation if it emits non-standard status codes
- Avoid transaction operations during application/TM shutdown
Defensive patterns
Strategy: try-catch
Try / catch
catch (TransactionException e) {
// 'TransactionManager reported transaction status as unknown'
// Treat the environment as unhealthy: report, stop issuing transaction work
alertOnTransactionManagerHealth(e);
} Prevention
- Keep the TransactionManager patched and healthy; STATUS_UNKNOWN usually follows an earlier TM error
- Do not run transactional work while crash recovery is active
- Avoid transaction operations during application shutdown
When it happens
Trigger: TransactionManager.getStatus() returning STATUS_UNKNOWN or an out-of-range/non-standard code, reached via Transaction.getStatus(), begin()'s status check, or the commit/rollback paths that read status.
Common situations: TM internal error or crash recovery in progress; a custom or buggy TransactionManager emitting invalid codes; transaction operations issued during TM/application shutdown.
Related errors
- UserTransaction reported transaction status as unknown
- Transaction is not accessible when using JTA with JPA-compli
- Exception pulsing TransactionCoordinator
- Explicitly joining a JTA transaction requires a JTA transact
- Unable to start isolated transaction
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/0d37b1408ed8ae47.
Report an issue: GitHub.