{"record":{"id":"15dc9ab3f46ba4cb","repo":"pentaho/pentaho-kettle","slug":"unable-to-write-log-channel-in-transformation-information-to","errorCode":null,"errorMessage":"Unable to write log channel in transformation information to log table!","messagePattern":"Unable to write log channel in transformation information to log table!","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/Job.java","lineNumber":1264,"sourceCode":"    // end PDI-7070\n\n    try {\n      db = new Database( this, channelLogTable.getDatabaseMeta() );\n      db.shareVariablesWith( this );\n      db.connect();\n      db.setCommit( logCommitSize );\n\n      List<LoggingHierarchy> loggingHierarchyList = getLoggingHierarchy();\n      for ( LoggingHierarchy loggingHierarchy : loggingHierarchyList ) {\n        db.writeLogRecord( channelLogTable, LogStatus.START, loggingHierarchy, null );\n      }\n\n      // Also time-out the log records in here...\n      //\n      db.cleanupLogRecords( channelLogTable, getJobname() );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG,\n          \"Trans.Exception.UnableToWriteLogChannelInformationToLogTable\" ), e );\n    } finally {\n      if ( !db.isAutoCommit() ) {\n        db.commit( true );\n      }\n      db.close();\n    }\n  }\n\n  /**\n   * Write job entry log information.\n   *\n   * @throws KettleException\n   *           the kettle exception\n   */\n  protected void writeJobEntryLogInformation() throws KettleException {\n    Database db = null;\n    JobEntryLogTable jobEntryLogTable = getJobMeta().getJobEntryLogTable();","sourceCodeStart":1246,"sourceCodeEnd":1282,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1246-L1282","documentation":"Thrown by writeLogChannelInformation when any Exception occurs while persisting channel log records (and cleaning up timed-out records) for the channel log table. The message is borrowed from the Trans message key but thrown in the Job class; the original exception is chained.","triggerScenarios":"Any failure during channel log writes or db.cleanupLogRecords(channelLogTable, ...) — bad connection, missing table, SQL error, or unexpected exception in the write path.","commonSituations":"Channel log table not created; wrong logging DB configured; Kettle version mismatch between client and log table DDL; transient DB outages during job run.","solutions":["Inspect the chained cause for the root SQL/IO failure","Create/repair the channel log table with the generated DDL","Verify the logging database connection configuration","Re-run after confirming DB availability; consider periodic cleanup to keep the table small"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"try (Connection c = db.connect()) {\n  ResultSet rs = c.getMetaData().getTables(null, null, channelLogTable.getTableName(), null);\n  if (!rs.next()) throw new IllegalStateException(\"Channel log table missing: \" + channelLogTable.getTableName());\n}","typeGuard":null,"tryCatchPattern":"try {\n  job.run();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"Unable to write log channel\")) {\n    log.error(\"Channel log persistence failed\", e.getCause());\n  }\n}","preventionTips":["Create channel log tables from Kettle-generated DDL","Confirm the logging connection config before job execution","Schedule cleanupLogRecords regularly to prevent table bloat"],"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"}