pentaho/pentaho-kettle · error · KettleException

There was an unexpected error while logging job entry…

Error message

There was an unexpected error while logging job entry information to a log table

What it means

Job wraps any exception thrown while writing job-entry START log records to the configured job entry log table into a KettleException with this message. The library throws it because logging job entry information to the database log table failed (db.writeLogRecord or db.cleanupLogRecords threw). It signals a logging-infrastructure problem, not a job logic problem, but it aborts the surrounding execution path.

Solutions

  1. Verify the job entry log table database connection: test it in the repository/database connection dialog and confirm the DB is reachable.
  2. Check the log table exists with the expected columns for your Pentaho version; recreate it via the log table SQL generation option.
  3. Grant the connection user INSERT/UPDATE/DELETE on the job entry log table.
  4. Review the chained cause exception (getCause()) for the real database error and fix accordingly.
  5. If logging is not needed, disable the job entry log table in the job's logging settings.

Example fix

// before: log table pointing at a dead connection
JobEntryLogTable table = jobMeta.getJobLogTable();
table.setConnectionName("prod-log-db"); // DB down
// after: validate connection before run
DatabaseMeta logDb = jobMeta.findDatabase("prod-log-db");
if (logDb == null || !testConnection(logDb)) {
  jobMeta.getJobEntryLogTable().setConnectionName("local-log-db");
}
Defensive patterns

Strategy: try-catch

Validate before calling

DatabaseMeta logDb = jobMeta.findDatabase(jobMeta.getJobEntryLogTable().getConnectionName());
if (logDb == null) throw new IllegalStateException("Log connection not defined");
try (Database db = new Database(logDb)) { db.connect(); }

Try / catch

try {
  job.startExecution();
} catch (KettleException e) {
  if (e.getMessage().contains("log entry information")) {
    log.warn("Job entry log table write failed: {}", e.getCause(), e);
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling Job execution paths that write job entry log records when the job entry log table is misconfigured, the log database connection is down, the table/schema does not exist, or cleanupLogRecords fails on the log table.

Common situations: Log table configured against an unreachable/unsupported database; user lacks INSERT/DELETE rights on the log table; schema changed between Pentaho versions; connection pool exhausted at job start.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/ae35f40580967b24. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/Job.java:1295

   * @throws KettleException
   *           the kettle exception
   */
  protected void writeJobEntryLogInformation() throws KettleException {
    Database db = null;
    JobEntryLogTable jobEntryLogTable = getJobMeta().getJobEntryLogTable();
    try {
      db = createDataBase( jobEntryLogTable.getDatabaseMeta() );
      db.shareVariablesWith( this );
      db.connect();
      db.setCommit( logCommitSize );

      for ( JobEntryCopy copy : getJobMeta().getJobCopies() ) {
        db.writeLogRecord( jobEntryLogTable, LogStatus.START, copy, this );
      }

      db.cleanupLogRecords( jobEntryLogTable, getName() );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "Job.Exception.UnableToJobEntryInformationToLogTable" ),
          e );
    } finally {
      if ( !db.isAutoCommit() ) {
        db.commitLog( true, jobEntryLogTable );
      }
      db.close();
    }
  }

  protected Database createDataBase( DatabaseMeta databaseMeta ) {
    return new Database( this, databaseMeta );
  }

  public boolean isInitialized() {
    int exist = status.get() & BitMaskStatus.INITIALIZED.mask;
    return exist != 0;
  }

View on GitHub (pinned to f3058517a1)