{"record":{"id":"7cd160430238502e","repo":"pentaho/pentaho-kettle","slug":"jobtrans-exception-metadataload-jobentrytrans","errorCode":null,"errorMessage":"JobTrans.Exception.MetaDataLoad","messagePattern":"JobTrans\\.Exception\\.MetaDataLoad","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/trans/JobEntryTrans.java","lineNumber":1354,"sourceCode":"        // parent directory (e.g. \"/public\" instead of \"/public/test\") when a transformation is invoked\n        // from a job entry.\n\n        //  When the child parameter does exist in the parent parameters, overwrite the child parameter by the\n        // parent parameter.\n        StepWithMappingMeta.replaceVariableValues( transMeta, space, \"Trans\" );\n        if ( isPassingAllParameters() ) {\n          // All other parent parameters need to get copied into the child parameters  (when the 'Inherit all\n          // variables from the transformation?' option is checked)\n          StepWithMappingMeta.addMissingVariables( transMeta, space );\n        }\n      }\n\n      return transMeta;\n    } catch ( final KettleException ke ) {\n      // if we get a KettleException, simply re-throw it\n      throw ke;\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobTrans.Exception.MetaDataLoad\" ), e );\n    }\n  }\n\n  @Override\n  public boolean evaluates() {\n    return true;\n  }\n\n  @Override\n  public boolean isUnconditional() {\n    return true;\n  }\n\n  @Override\n  public List<SQLStatement> getSQLStatements( Repository repository, IMetaStore metaStore, VariableSpace space ) throws KettleException {\n    this.copyVariablesFrom( space );\n    TransMeta transMeta = getTransMeta( repository, metaStore, this );\n","sourceCodeStart":1336,"sourceCodeEnd":1372,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/trans/JobEntryTrans.java#L1336-L1372","documentation":"Thrown from JobEntryTrans's transformation-metadata loading path (getTransMeta-style logic reached from the entry) when loading the referenced transformation's metadata throws a checked KettleException, which is re-thrown unchanged; any other unexpected Exception is wrapped in a KettleException with the JobTrans.Exception.MetaDataLoad message. It means the transformation's .ktr metadata could not be loaded. The root cause is attached.","triggerScenarios":"The referenced transformation file does not exist or is unreadable, the .ktr XML is corrupt/incompatible, repository-based transformations cannot be found at the given path/id, or repository connection failures occur while loading metadata.","commonSituations":"Transformation moved/renamed on disk or in the repository after the job was designed; variables used in the transformation path not set at runtime; .ktr saved by a newer Pentaho version; repository permissions preventing metadata reads.","solutions":["Check the wrapped cause to see whether it's a file, XML, or repository problem","Verify the transformation file/repository path exists and is readable at runtime (resolve any variables)","Re-save/re-export the transformation with a compatible Pentaho version","Confirm repository connection settings and permissions for metadata loading"],"exampleFix":"// before\njobEntry.setFilename( \"${TRANS_DIR}/etl.ktr\" ); // TRANS_DIR unset\n// after\nString path = jobEntry.environmentSubstitute( \"${TRANS_DIR}/etl.ktr\" );\nif ( !new File( path ).exists() ) throw new IllegalStateException( \"Missing ktr: \" + path );\njobEntry.setFilename( \"${TRANS_DIR}/etl.ktr\" );","handlingStrategy":"validation","validationCode":"String path = jobEntry.environmentSubstitute( jobEntry.getFilename() );\nif ( path != null && !new File( path ).exists() ) {\n  throw new IllegalStateException( \"Transformation file missing: \" + path );\n}","typeGuard":null,"tryCatchPattern":"try { TransMeta tm = jobEntry.getTransMeta(); } catch ( KettleException e ) { log.error( \"Metadata load failed\", e.getCause() != null ? e.getCause() : e ); }","preventionTips":["Ensure referenced .ktr files ship with the job","Resolve variables in paths before execution","Keep Pentaho versions consistent across environments","Verify repository read permissions for metadata"],"tags":["kettle","metadata","transformation"],"backgroundTag":"file-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"}