pentaho/pentaho-kettle · error · KettleException

Unable to load transformation with id [" + idTransformation…

Error message

Unable to load transformation with id [" + idTransformation + "]

What it means

Catch-all wrapper in PurRepository.loadTransformation(ObjectId idTransformation, String versionLabel): any non-KettleException while loading a transformation by id (file fetch at version, revision lookup, TransMeta build, TransformationMetaLoaded extension point) is re-thrown as a KettleException with the transformation id in the message.

Solutions

  1. Inspect e.getCause() to find the root failure
  2. Verify the id exists with repository.exists(ObjectId) and fall back to path-based loading if not
  3. Reconnect to the repository if connectivity is the issue
  4. Confirm the versionLabel exists via getObjectRevision before loading

Example fix

// before
TransMeta tm = repo.loadTransformation(oldId, null);
// after
if (repo.exists(oldId)) {
  TransMeta tm = repo.loadTransformation(oldId, null);
} else {
  TransMeta tm = repo.loadTransformation(transPath, null);
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (!repo.exists(idTransformation)) {
  throw new KettleException("Transformation id no longer exists: " + idTransformation);
}

Try / catch

try {
  TransMeta tm = repo.loadTransformation(idTransformation, versionLabel);
} catch (KettleException e) {
  log.error("Transformation load failed for id " + idTransformation + ", cause=" + e.getCause(), e);
  // fallback: path-based load
  TransMeta tm2 = repo.loadTransformation(path, null);
}

Prevention

When it happens

Trigger: Calling loadTransformation(ObjectId, String versionLabel) with a deleted/invalid id, an invalid versionLabel, corrupt stored transformation XML, or a repository connectivity failure.

Common situations: Using a cached ObjectId after the transformation was deleted; id from a different repository; requesting a version that was purged; network failure to the BI server.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:3291

        transMeta.setRepository( this );
        transMeta.setRepositoryDirectory( findDirectory( getParentPath( file.getPath() ) ) );
        transMeta.setRepositoryLock( unifiedRepositoryLockService.getLock( file ) );
        transMeta.setMetaStore( MetaStoreConst.getDefaultMetastore() ); // inject metastore

        ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.TransSharedObjectsLoaded.id, transMeta );
        transDelegate.dataNodeToElement(
          pur.getDataAtVersionForRead( idTransformation.getId(), versionLabel, NodeRepositoryFileData.class ).getNode(),
          transMeta );
      } finally {
        readWriteLock.readLock().unlock();
      }

      ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.TransformationMetaLoaded.id, transMeta );

      transMeta.clearChanged();
      return transMeta;
    } catch ( Exception e ) {
      throw new KettleException( "Unable to load transformation with id [" + idTransformation + "]", e );
    }
  }

  @Override
  public String getConnectMessage() {
    return connectMessage;
  }

  @Override
  public String[] getJobsUsingDatabase( ObjectId id_database ) throws KettleException {
    List<String> result = new ArrayList<String>();
    for ( RepositoryFile file : getReferrers( id_database, Collections.singletonList( RepositoryObjectType.JOB ) ) ) {
      result.add( file.getPath() );
    }
    return result.toArray( new String[result.size()] );
  }

  @Override

View on GitHub (pinned to f3058517a1)