pentaho/pentaho-kettle · error · KettleTransException

Trans.Exception.NoLogTableDefined

Error message

Trans.Exception.NoLogTableDefined

What it means

When a transformation has a database log connection configured, Trans checks the configured log table before opening the logging database connection. If the log table name is empty, it throws KettleTransException with message Trans.Exception.NoLogTableDefined, because database logging without a table cannot work.

Solutions

  1. Set the Log Table field in the transformation's Logging settings (Trans logging tab)
  2. Ensure any ${VARIABLE} used for the table name resolves to a non-empty value at runtime
  3. Verify transLogTable.getTableName() in the ktr XML is populated
  4. Clear the log database connection entirely if database logging is not wanted

Example fix

// before (transformation logging config)
<trans-log-table><connection>db</connection><table></table></trans-log-table>
// after
<trans-log-table><connection>db</connection><table>TRANS_LOG</table></trans-log-table>
Defensive patterns

Strategy: validation

Validate before calling

TransLogTable logTable = transMeta.getTransLogTable();
if (logTable.getDatabaseMeta() != null && (logTable.getTableName() == null || logTable.getTableName().trim().isEmpty())) {
  throw new IllegalArgumentException("Log database is set but log table name is empty");
}

Try / catch

try {
  trans.execute(args);
} catch (KettleTransException e) {
  if (e.getMessage().contains("NoLogTableDefined")) {
    // fix logging config and retry
  } else throw e;
}

Prevention

When it happens

Trigger: Trans init() with a trans log database connection set (transLogTable / logConnection non-null) but the associated log table name is empty in the transformation's logging settings.

Common situations: Transformation saved with a log database selected but the Log Table field left blank; log table name supplied via a variable that resolved to empty; hand-edited transformation XML missing the TABLE_NAME attribute.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/Trans.java:2263

    TransLogTable transLogTable = transMeta.getTransLogTable();

    currentDate = new Date();
    logDate = new Date();
    startDate = Const.MIN_DATE;
    endDate = currentDate;

    DatabaseMeta logConnection = transLogTable.getDatabaseMeta();
    String logTable = environmentSubstitute( transLogTable.getActualTableName() );
    String logSchema = environmentSubstitute( transLogTable.getActualSchemaName() );

    try {
      if ( logConnection != null ) {

        String logSchemaAndTable = logConnection.getQuotedSchemaTableCombination( logSchema, logTable );
        if ( Utils.isEmpty( logTable ) ) {
          // It doesn't make sense to start database logging without a table
          // to log to.
          throw new KettleTransException( BaseMessages.getString( PKG, "Trans.Exception.NoLogTableDefined" ) );
        }
        if ( Utils.isEmpty( transMeta.getName() ) && logTable != null ) {
          throw new KettleException( BaseMessages.getString( PKG, "Trans.Exception.NoTransnameAvailableForLogging" ) );
        }
        transLogTableDatabaseConnection = new Database( this, logConnection );
        transLogTableDatabaseConnection.shareVariablesWith( this );
        if ( log.isDetailed() ) {
          log.logDetailed( BaseMessages.getString( PKG, "Trans.Log.OpeningLogConnection", "" + logConnection ) );
        }
        transLogTableDatabaseConnection.connect();
        transLogTableDatabaseConnection.setCommit( logCommitSize );

        // See if we have to add a batch id...
        // Do this first, before anything else to lock the complete table exclusively
        //
        if ( transLogTable.isBatchIdUsed() ) {
          Long id_batch =
            logConnection.getNextBatchId( transLogTableDatabaseConnection, logSchema, logTable, transLogTable

View on GitHub (pinned to f3058517a1)