pentaho/pentaho-kettle · error · KettleDatabaseException
Database.Exception.UnableToSetSavepoint
Error message
Database.Exception.UnableToSetSavepoint
What it means
Thrown by Database.setSavepoint() (Database.java:5088) when connection.setSavepoint() fails with a SQLException. JDBC savepoints require an active transaction with auto-commit disabled, and not all drivers support them.
Solutions
- Call Database.setAutoCommit(false) before requesting a savepoint
- Verify the connection is open and valid (checkDatabaseException/connected state)
- Confirm the target database and driver support savepoints (JDBC 3.0+, transactional tables)
- Check supportsSavepoints() on the DatabaseMeta before using savepoint logic
- Inspect the wrapped SQLException cause for feature-not-supported vs connection errors
Example fix
// before
Savepoint sp = database.setSavepoint();
// after
if ( database.getDatabaseMeta().supportsSavepoints() ) {
database.setAutoCommit( false );
Savepoint sp = database.setSavepoint();
} Defensive patterns
Strategy: validation
Validate before calling
if ( !databaseMeta.supportsSavepoints() ) {
throw new IllegalStateException( "Savepoints not supported by " + databaseMeta.getPluginName() );
}
database.setAutoCommit( false ); Try / catch
try {
savepoint = database.setSavepoint();
} catch ( KettleDatabaseException e ) {
SQLException sqle = (SQLException) e.getCause();
if ( sqle instanceof SQLFeatureNotSupportedException ) {
// fall back to full transaction without savepoints
} else {
throw e;
}
} Prevention
- Always disable auto-commit before setSavepoint
- Check DatabaseMeta.supportsSavepoints() first
- Keep the connection alive across the savepoint lifecycle
- Avoid savepoints on non-transactional storage engines
When it happens
Trigger: Calling Database.setSavepoint() while autoCommit is still true, the connection is closed, or the JDBC driver does not support savepoints (throws SQLFeatureNotSupportedException).
Common situations: Forgetting setAutoCommit(false) before setSavepoint; using drivers/databases without savepoint support (e.g. older MySQL/MyISAM tables); calling savepoint APIs after the connection has been dropped.
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.UnableToReleaseSavepoint
- Database.Exception.UnableToRollbackToSavepoint
- 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/21c8af8867176463.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/database/Database.java:5088
break;
default:
ins.append( fields.getString( r, i ) );
break;
}
}
}
ins.append( ')' );
} catch ( Exception e ) {
throw new KettleDatabaseException( e );
}
return ins.toString();
}
public Savepoint setSavepoint() throws KettleDatabaseException {
try {
return connection.setSavepoint();
} catch ( SQLException e ) {
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(View on GitHub (pinned to f3058517a1)