pentaho/pentaho-kettle · error · KettleDatabaseException
Database.Exception.UnableToSetSavepointName
Error message
Database.Exception.UnableToSetSavepointName
What it means
Thrown by Database.setSavepoint(String savePointName) (Database.java:5097) when connection.setSavepoint(savePointName) fails with a SQLException. Same family as the unnamed variant, but with a named savepoint, so naming/identifier rules add extra failure modes.
Solutions
- Call setAutoCommit(false) before creating the savepoint
- Shorten/quote the savepoint name to satisfy DB identifier rules
- Check supportsSavepoints() on the DatabaseMeta before using named savepoints
- Verify the connection is still open; reconnect if it was dropped
- Read the wrapped SQLException for the driver-specific cause
Example fix
// before Savepoint sp = database.setSavepoint( "my_very_long_savepoint_name_for_step" ); // after String name = "sp_" + UUID.randomUUID().toString().replace( "-", "" ).substring( 0, 20 ); database.setAutoCommit( false ); Savepoint sp = database.setSavepoint( name );
Defensive patterns
Strategy: validation
Validate before calling
if ( savePointName == null || savePointName.length() > 30 ) {
savePointName = "sp" + System.nanoTime();
}
database.setAutoCommit( false ); Try / catch
try {
savepoint = database.setSavepoint( savePointName );
} catch ( KettleDatabaseException e ) {
SQLException cause = (SQLException) e.getCause();
log.error( "Named savepoint [" + savePointName + "] failed: " + cause.getMessage(), cause );
throw e;
} Prevention
- Keep savepoint names short and identifier-safe
- Disable auto-commit before named savepoints
- Verify supportsSavepoints() on the target dialect
- Generate unique names per savepoint creation
When it happens
Trigger: Calling Database.setSavepoint(name) with an invalid or too-long savepoint identifier, auto-commit enabled, closed connection, or a driver lacking savepoint support.
Common situations: Savepoint names exceeding DB identifier limits (e.g. 30 chars on Oracle); illegal characters in the savepoint name; auto-commit left on; duplicate savepoint name reuse on drivers that forbid it.
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.UnableToSetSavepoint
- Database.Exception.UnableToDisableAutoCommit
- Database.Exception.UnableToEnableAutoCommit
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/6966db564e6b1781.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/database/Database.java:5097
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(
PKG, "Database.Exception.UnableToReleaseSavepoint" ), e );
}
}
public void rollback( Savepoint savepoint ) throws KettleDatabaseException {
try {
connection.rollback( savepoint );
} catch ( SQLException e ) {
throw new KettleDatabaseException( BaseMessages.getString(View on GitHub (pinned to f3058517a1)