pentaho/pentaho-kettle · error · KettleException

TransMeta.Exception.DatabaseErrorOccuredReadingTransformatio…

Error message

TransMeta.Exception.DatabaseErrorOccuredReadingTransformation2

What it means

The generic (non-database) branch of the same catch structure in loadTransformation: any non-KettleDatabaseException Exception during load is wrapped in a KettleException with the TransMeta.Exception.DatabaseErrorOccuredReadingTransformation2 message. It covers unexpected runtime errors (NPEs, ClassCastExceptions, plugin issues) while deserializing transformation metadata.

Solutions

  1. Read the wrapped cause (e) to identify the real runtime problem (NPE, missing plugin, etc.).
  2. Align client Kettle/Pentaho version with the repository writer version (upgrade the engine or the repository).
  3. Install the step/job plugin jars referenced by the transformation before loading.
  4. Manually inspect the transformation's repository rows for corrupted values.

Example fix

// before
TransMeta tm = repository.loadTransformation(name, dir, monitor, true, null);
// after
try {
  TransMeta tm = repository.loadTransformation(name, dir, monitor, true, null);
} catch (KettleException e) {
  if (e.getCause() instanceof KettleDatabaseException) {
    throw e; // DB branch, different message
  }
  log.logError("Runtime problem loading transformation: " + e.getCause(), e);
  throw e;
}
Defensive patterns

Strategy: try-catch

Try / catch

try { return repository.loadTransformation(name, dir, monitor, true, null); } catch (KettleException e) { log.logError("Load runtime error: " + e.getCause(), e.getCause() instanceof Exception ? (Exception) e.getCause() : e); throw e; }

Prevention

When it happens

Trigger: Any Exception other than KettleDatabaseException during loadTransformation, e.g. repository rows containing nulls the loader does not expect, plugin step types no longer available, or programming defects in the load path.

Common situations: Repository written by a newer Kettle version read with an older client; missing step plugin jars so metadata cannot be reconstructed; corrupted rows with unexpected values.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java:658

          log
            .logDetailed( BaseMessages.getString(
              PKG, "TransMeta.Log.LoadedTransformation", transname, transMeta.getRepositoryDirectory().getPath() ) );
        }

        // close prepared statements, minimize locking etc.
        //
        repository.connectionDelegate.closeAttributeLookupPreparedStatements();

        return transMeta;
      } catch ( KettleDatabaseException e ) {
        log.logError( BaseMessages.getString( PKG, "TransMeta.Log.DatabaseErrorOccuredReadingTransformation" )
          + Const.CR + e );
        throw new KettleException( BaseMessages.getString(
          PKG, "TransMeta.Exception.DatabaseErrorOccuredReadingTransformation" ), e );
      } catch ( Exception e ) {
        log.logError( BaseMessages.getString( PKG, "TransMeta.Log.DatabaseErrorOccuredReadingTransformation" )
          + Const.CR + e );
        throw new KettleException( BaseMessages.getString(
          PKG, "TransMeta.Exception.DatabaseErrorOccuredReadingTransformation2" ), e );
      } finally {
        transMeta.initializeVariablesFrom( null );
        if ( setInternalVariables ) {
          transMeta.setInternalKettleVariables();
        }
      }
    }
  }

  /**
   * Load the transformation name & other details from a repository.
   */
  private void loadRepTrans( TransMeta transMeta ) throws KettleException {
    try {
      RowMetaAndData r = getTransformation( transMeta.getObjectId() );

      if ( r != null ) {

View on GitHub (pinned to f3058517a1)