pentaho/pentaho-kettle · warning · KettleDatabaseException
Database.Exception.UnableToReleaseSavepoint
Error message
Database.Exception.UnableToReleaseSavepoint
What it means
Thrown by Database.releaseSavepoint(Savepoint) (Database.java:5106) when connection.releaseSavepoint() fails with a SQLException. Releasing a savepoint discards it so its undo no longer applies; failure usually means the savepoint or transaction is no longer valid.
Solutions
- Only release savepoints while the same transaction is still active (before commit/rollback)
- Track savepoint state and skip release when it was already invalidated by rollback(savepoint)
- Guard the release in try-catch and log — a failed release is rarely fatal after a successful rollback
- Ensure the Savepoint object originated from this same connection
- Check driver support for savepoints before using them
Example fix
// before
connection.commit();
database.releaseSavepoint( savepoint );
// after
if ( savepoint != null && !transactionFinished ) {
database.releaseSavepoint( savepoint );
}
database.commit(); Defensive patterns
Strategy: try-catch
Validate before calling
boolean canRelease = savepoint != null && !transactionCommitted && !transactionRolledBack;
if ( canRelease ) {
database.releaseSavepoint( savepoint );
} Try / catch
try {
database.releaseSavepoint( savepoint );
} catch ( KettleDatabaseException e ) {
log.debug( "Savepoint release failed (already invalidated?)", e ); // non-fatal after rollback
} Prevention
- Track transaction state; never release after commit/rollback
- Treat release failures as non-fatal cleanup issues
- Reuse savepoints only within the same connection
- Avoid savepoints on XA/distributed connections
When it happens
Trigger: Calling Database.releaseSavepoint() after the transaction was already committed/rolled back, after the savepoint was already released, or with a savepoint from a different/closed connection.
Common situations: Committing then still releasing the savepoint; rolling back to a savepoint then releasing it (already invalidated); connection pool returning the connection mid-transaction; distributed XA connections where savepoints are unsupported.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Database.Exception.UnableToRollbackToSavepoint
- Database.Exception.UnableToSetSavepoint
- Database.Exception.UnableToSetSavepointName
- Database.Exception.UnableToDisableAutoCommit
- Database.Exception.UnableToEnableAutoCommit
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7518425c7d4a16da.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/database/Database.java:5106
throw new KettleDatabaseException(
BaseMessages.getString( PKG, "Database.Exception.UnableToSetSavepoint" ), e );
}
}
public Savepoint setSavepoint( String savePointName ) throws KettleDatabaseException {
try {
return connection.setSavepoint( savePointName );
} catch ( SQLException e ) {
throw new KettleDatabaseException( BaseMessages.getString(
PKG, "Database.Exception.UnableToSetSavepointName", savePointName ), e );
}
}
public void releaseSavepoint( Savepoint savepoint ) throws KettleDatabaseException {
try {
connection.releaseSavepoint( savepoint );
} catch ( SQLException e ) {
throw new KettleDatabaseException( BaseMessages.getString(
PKG, "Database.Exception.UnableToReleaseSavepoint" ), e );
}
}
public void rollback( Savepoint savepoint ) throws KettleDatabaseException {
try {
connection.rollback( savepoint );
} catch ( SQLException e ) {
throw new KettleDatabaseException( BaseMessages.getString(
PKG, "Database.Exception.UnableToRollbackToSavepoint" ), e );
}
}
public Object getParentObject() {
return parentLoggingObject;
}
/**View on GitHub (pinned to f3058517a1)