{"record":{"id":"1c68218dae66f247","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-friendlymetatype-realmetaname","errorCode":null,"errorMessage":"Unable to load <friendlyMetaType> [<realMetaName>]","messagePattern":"Unable to load <friendlyMetaType> \\[<realMetaName>\\]","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/base/MetaFileLoaderImpl.java","lineNumber":517,"sourceCode":"        theMeta = attemptCacheRead( cacheKey ); //try to get from the cache first\n        if ( theMeta == null ) {\n          if ( rep != null ) {\n            if ( !Utils.isEmpty( realMetaName ) && !Utils.isEmpty( realDirectory ) ) {\n\n              realDirectory = r.normalizeSlashes( realDirectory );\n              RepositoryDirectoryInterface repdir = rep.findDirectory( realDirectory );\n              if ( repdir != null ) {\n                try {\n                  // reads the last revision in the repository...\n                  theMeta = isTransMeta() ? (T) rep.loadTransformation( bowl, realMetaName, repdir, null, true, null, tmpSpace )\n                    : (T) rep.loadJob( realMetaName, repdir, null, null, tmpSpace );\n                  if ( theMeta != null ) {\n                    idContainer[ 0 ] = cacheKey;\n                  }\n                  LogChannel.GENERAL.logDetailed( LOADING + friendlyMetaType + FROM_REPOSITORY,\n                    \"Executor \" + friendlyMetaType + \" [\" + realMetaName + \"] was loaded from the repository\" );\n                } catch ( Exception e ) {\n                  throw new KettleException( \"Unable to load \" + friendlyMetaType + \" [\" + realMetaName + \"]\", e );\n                }\n              }\n            }\n            // If we couldn't load from repo, try loading from vfs as fallback\n            if ( theMeta == null ) {\n              cacheKey = ensureFilePathHasExtension( cacheKey );\n              theMeta = attemptLoadMeta( bowl, cacheKey, rep, metaStore, null, tmpSpace, idContainer );\n              LogChannel.GENERAL.logDetailed( LOADING + friendlyMetaType + FROM_REPOSITORY,\n                friendlyMetaType + \" was loaded from XML file [\" + cacheKey + \"]\" );\n            }\n          } else {\n            // rep is null, let's try loading by filename\n            try {\n              theMeta = attemptLoadMeta( bowl, cacheKey, rep, metaStore, null, tmpSpace, idContainer );\n            } catch ( KettleException ke ) {\n              try {\n                // add .ktr extension and try again\n                String extension = isTransMeta() ? Const.STRING_TRANS_DEFAULT_EXT : Const.STRING_JOB_DEFAULT_EXT;","sourceCodeStart":499,"sourceCodeEnd":535,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/base/MetaFileLoaderImpl.java#L499-L535","documentation":"Thrown by MetaFileLoaderImpl.getMetaForStep when a step executor meta object (e.g. a Trans/Job executor meta referenced by name) cannot be loaded from the repository. The original exception (repository lookup failure, XML parse error, etc.) is wrapped as the cause. It indicates the referenced meta object exists as a reference but could not be materialized from storage.","triggerScenarios":"getMetaForStep is called with a repository connection and the named meta fails to load: repository exception, corrupt/missing object, or an exception during repository read of the executor step's meta.","commonSituations":"Referenced transformation/job was renamed or deleted from the repository; wrong repository directory; repository connectivity problems (network, credentials); version-control conflicts leaving a dangling reference.","solutions":["Verify the referenced meta object exists in the repository at the expected directory and name","Check repository connectivity and credentials; test by opening the object in Spoon","Read the wrapped cause exception for the underlying repository/parse error","As a fallback, ensure the VFS path variant (with extension) of the meta name is valid"],"exampleFix":"// before: loading meta by bare name with no directory context\nTransExecutorMeta meta = (TransExecutorMeta) loader.getMetaForStep(stepMeta, repo, directory);\n// after: resolve and validate the object exists before loading\nif (repo == null || !repo.isConnected()) { throw new IllegalStateException(\"Repository not connected\"); }\nRepositoryObjectLocated located = repo.getObjectInformation objectId = repo.getObjectId(new StringObjectId(id));\n// then load with the resolved objectId/directory","handlingStrategy":"try-catch","validationCode":"// Verify repository connectivity and object presence before load\nif (repository == null || !repository.isConnected()) { throw new IllegalStateException(\"Repository not connected\"); }\nboolean exists = repository.getObjectInformation(...) != null; // or repository.exists(metaName, directory)\nif (!exists) { throw new KettleException(\"Meta not found in repo: \" + realMetaName); }","typeGuard":"// Java: check loader configuration before use\nif (metaStore == null || repository == null) return false;","tryCatchPattern":"try { meta = loader.getMetaForStep(stepMeta, repository, directory, idContainer); }\ncatch (KettleException e) { log.error(\"Failed to load \" + realMetaName + \", cause: \" + e.getCause(), e); throw e; }","preventionTips":["Verify referenced transformations/jobs exist in the repo before saving executor steps","Test repository connectivity before batch loading","Always inspect the wrapped cause of KettleException","Keep names/directories of referenced metas in sync after renames"],"tags":["repository","kettle","meta-load-failed"],"backgroundTag":"entity-not-found","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"}