hibernate/hibernate-orm · error · TransactionException
Unable to resume suspended transaction
Error message
Unable to resume suspended transaction
What it means
TransactionException from JtaIsolationDelegate's finally block: the isolated work succeeded, but resuming the suspended JTA transaction failed. (When the work itself failed, the resume error is attached as a suppressed exception instead — this standalone throw means the work is committed/done while the surrounding transaction context is lost.) The caller's transaction must be abandoned and restarted.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaIsolationDelegate.java:129
return callable.call();
}
catch ( HibernateException he ) {
exception = he;
throw he;
}
catch ( Throwable throwable ) {
exception = throwable;
throw new HibernateException( "Unable to perform isolated work", throwable );
}
finally {
try {
// resume the JTA transaction we suspended
resume( surroundingTransaction );
}
catch ( Throwable throwable ) {
// if the actual work had an error, use that; otherwise throw this error
if ( exception == null ) {
throw new TransactionException( "Unable to resume suspended transaction", throwable );
}
else {
exception.addSuppressed( throwable );
}
}
}
}
private void resume(Transaction surroundingTransaction) throws InvalidTransactionException, SystemException {
if ( surroundingTransaction != null ) {
transactionManager.resume( surroundingTransaction );
JTA_LOGGER.transactionResumed( surroundingTransaction );
}
}
private Transaction suspend() throws SystemException {
final var surroundingTransaction = transactionManager.suspend();
if ( surroundingTransaction != null ) {View on GitHub (pinned to fad1729dce)
Solutions
- Abort and restart the outer transaction — it cannot be safely continued after a failed resume
- Increase the JTA transaction timeout above worst-case isolated-work duration
- Move long isolated work (DDL, big generator segment allocation) out of transactional scope
- Inspect TM logs for the resume failure reason before retrying
Example fix
# before: default 60s timeout, isolated work inside a batch job exceeds it # WildFly: /subsystem=transactions:write-attribute(name=default-timeout,value=60) # after: raise the timeout for jobs that suspend/resume transactions # WildFly: /subsystem=transactions:write-attribute(name=default-timeout,value=300)
Defensive patterns
Strategy: try-catch
Try / catch
catch (org.hibernate.TransactionException e) {
// resume failed after successful isolated work: treat the outer transaction as lost —
// roll back / abandon it, verify what the isolated work did on the DB, restart fresh
} Prevention
- Raise the JTA transaction timeout above worst-case isolated-work duration
- Keep isolated work (DDL, large generator allocations) out of long transactions
- Alert on suspended-transaction timeouts in TM monitoring
When it happens
Trigger: After isolated work (ID generation, DDL helper) under JTA, TransactionManager.resume() throws — the suspended transaction timed out or was rolled back while the isolated work ran, or the TM is failing mid-operation.
Common situations: JTA transaction timeouts shorter than the duration of isolated work inside batch jobs; TM recovery or failover during long operations; heavy load extending work past the default timeout.
Related errors
- Unable to resume JTA transaction after DDL execution
- Unable to apply requested transaction timeout
- Unable to apply requested transaction timeout
- Named query hint [" + hintName + "] is not an integer: " + q
- Could not obtain TransactionManager from JtaPlatform
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/683f8507f5326792.
Report an issue: GitHub.