pentaho/pentaho-kettle · error · KettleException
Trans.Exception.UnableToPerformLoggingAtTransEnd
Error message
Trans.Exception.UnableToPerformLoggingAtTransEnd
What it means
Thrown from a TransListener added in Trans.beginProcessing(): when the transformation finishes, endProcessing() and writeStepPerformanceLogRecords(...) write final log/step-performance records; if that raises KettleException it is rethrown as UnableToPerformLoggingAtTransEnd. The transformation itself has already run; only the final logging write-out failed.
Solutions
- Check the cause exception for the underlying database error (connection closed, table missing) and fix the log database.
- Verify the step performance log table exists with the correct schema; recreate via the Log tab SQL generation.
- Enable log table batching/reconnection or use interval logging to reduce long-held connections that get dropped by firewalls.
- Recover run results from the transformation log table's earlier rows; the transformation execution itself was unaffected.
Example fix
// before: long transformation, DB connection idle-dropped, final perf record write fails // after: enable interval logging on the trans log table Interval in seconds = 30 (Log tab, keeps connection alive and writes periodically)
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify step performance log table connectivity before the run
DatabaseMeta perfDb = logTable.getDatabaseMeta();
if (!new Database(trans, perfDb).checkTableExists("STEP_PERFORMANCE")) {
log.warn("Step performance log table missing; final perf write will fail");
} Try / catch
try {
trans.waitUntilFinished();
} catch (Exception e) {
Throwable root = e;
while (root.getCause() != null) root = root.getCause();
log.error("End-of-run logging failed; transformation result still in trans log table", root);
} Prevention
- Enable interval logging to keep the log connection from idling out on firewalls.
- Monitor DB uptime during long transformations.
- Set reasonable row limits on step performance logging to avoid huge final writes.
When it happens
Trigger: A TransAdapter.transFinished listener wraps endProcessing() plus writeStepPerformanceLogRecords(..., LogStatus.END) in try/catch(KettleException) and rethrows with key Trans.Exception.UnableToPerformLoggingAtTransEnd; requires step performance logging to be enabled (transPerfMonitors / performance log table configured).
Common situations: Step performance log table connection lost during a long-running transformation; database restarted while the transformation ran; log table full/disk quota exceeded; performance log table schema altered.
Related errors
- Conversion error after getting last logdate from
- There was an unexpected error while logging job entry…
- Trans.Exception.ConnectionCouldNotBeFound
- Trans.Exception.ErrorCalculatingDateRange
- Trans.Exception.ErrorWritingLogRecordToTable
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c3e08e276a514a9a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/Trans.java:2525
public void transFinished( Trans trans ) {
timer.cancel();
}
} );
}
// Add a listener to make sure that the last record is also written when transformation finishes...
//
addTransListener( new TransAdapter() {
@Override
public void transFinished( Trans trans ) throws KettleException {
try {
endProcessing();
lastWrittenStepPerformanceSequenceNr =
writeStepPerformanceLogRecords( lastWrittenStepPerformanceSequenceNr, LogStatus.END );
} catch ( KettleException e ) {
throw new KettleException( BaseMessages.getString( PKG,
"Trans.Exception.UnableToPerformLoggingAtTransEnd" ), e );
}
}
} );
}
// If we need to write out the step logging information, do so at the end of the transformation too...
//
StepLogTable stepLogTable = transMeta.getStepLogTable();
if ( stepLogTable.isDefined() ) {
addTransListener( new TransAdapter() {
@Override
public void transFinished( Trans trans ) throws KettleException {
try {
writeStepLogInformation();
} catch ( KettleException e ) {
throw new KettleException( BaseMessages.getString( PKG,View on GitHub (pinned to f3058517a1)