{"record":{"id":"e3cd3b974c8efc0b","repo":"pentaho/pentaho-kettle","slug":"unable-to-perform-logging-at-transformation-end","errorCode":null,"errorMessage":"Unable to perform logging at transformation end!","messagePattern":"Unable to perform logging at transformation end!","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/Job.java","lineNumber":1141,"sourceCode":"            throw new KettleException( BaseMessages.getString( PKG,\n                \"Job.Exception.UnableToPerformJobEntryLoggingAtJobEnd\" ), e );\n          }\n        }\n      } );\n    }\n\n    // If we need to write the log channel hierarchy and lineage information,\n    // add a listener for that too...\n    //\n    ChannelLogTable channelLogTable = jobMeta.getChannelLogTable();\n    if ( channelLogTable.isDefined() ) {\n      addJobListener( new JobAdapter() {\n\n        @Override public void jobFinished( Job job ) throws KettleException {\n          try {\n            writeLogChannelInformation();\n          } catch ( KettleException e ) {\n            throw new KettleException( BaseMessages.getString( PKG, \"Job.Exception.UnableToPerformLoggingAtTransEnd\" ),\n                e );\n          }\n        }\n      } );\n    }\n\n    JobExecutionExtension extension = new JobExecutionExtension( this, result, null, false );\n    ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.JobBeginProcessing.id, extension );\n\n    return true;\n  }\n\n  //\n  // Handle logging at end\n  /**\n   * End processing.\n   *\n   * @return true, if successful","sourceCodeStart":1123,"sourceCodeEnd":1159,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1123-L1159","documentation":"Registered as a jobFinished listener for the transformation-style log channel; if writeLogChannelInformation() throws at job end, the KettleException is re-wrapped with this (historically trans-oriented) message. Note the message text mentions transformation even though this is the Job class.","triggerScenarios":"At job end, writing the log channel (LoggingHierarchy / channel log) information to the channel log table throws a KettleException.","commonSituations":"Channel log table undefined/misconfigured in logging settings; DB connection lost during the run; channel log table schema mismatch after a Kettle upgrade.","solutions":["Check the chained cause for the underlying error","Verify the channel log table is defined and matches expected schema","Confirm connectivity to the logging database at job end","Upgrade/align log table DDL after Kettle version changes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (channelLogTable != null && channelLogTable.isDefined()) {\n  ResultSet rs = conn.getMetaData().getTables(null, null, channelLogTable.getTableName(), null);\n  if (!rs.next()) throw new IllegalStateException(\"Channel log table missing\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  job.run();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"Unable to perform logging\")) {\n    log.error(\"Channel log write failed at job end\", e.getCause());\n  }\n}","preventionTips":["Keep channel log table DDL in sync with the Kettle version","Validate logging configuration (connection + table defined) before execution","Ensure stable connectivity to the log DB for the whole run"],"tags":["database","logging","log-channel"],"backgroundTag":"database-write-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}