{"record":{"id":"e2e9a3cff72ae5ac","repo":"pentaho/pentaho-kettle","slug":"transmeta-exception-missingxmlfilepath","errorCode":null,"errorMessage":"TransMeta.Exception.MissingXMLFilePath","messagePattern":"TransMeta\\.Exception\\.MissingXMLFilePath","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/TransMeta.java","lineNumber":3058,"sourceCode":"   * @param rep\n   *          The repository to load the default set of connections from, null if no repository is available\n   * @param setInternalVariables\n   *          true if you want to set the internal variables based on this transformation information\n   * @param parentVariableSpace\n   *          the parent variable space to use during TransMeta construction\n   * @param prompter\n   *          the changed/replace listener or null if there is none\n   * @throws KettleXMLException\n   *           if any errors occur during parsing of the specified file\n   * @throws KettleMissingPluginsException\n   *           in case missing plugins were found (details are in the exception in that case)\n   */\n  public TransMeta( Bowl bowl, String fname, IMetaStore metaStore, Repository rep, boolean setInternalVariables,\n                    VariableSpace parentVariableSpace, OverwritePrompter prompter )\n    throws KettleXMLException, KettleMissingPluginsException {\n    // if fname is not provided, there's not much we can do, throw an exception\n    if ( StringUtils.isBlank( fname ) ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"TransMeta.Exception.MissingXMLFilePath\" ) );\n    }\n    this.metaStore = metaStore;\n    this.repository = rep;\n\n    // OK, try to load using the VFS stuff...\n    Document doc = null;\n    try {\n      // start by inheriting the bowl from the argument. It might get overwritten later. \n      if ( bowl != null ) {\n        setBowl( bowl );\n      }\n      if ( parentVariableSpace == null ) {\n        parentVariableSpace = new Variables();\n        // load globals\n        parentVariableSpace.initializeVariablesFrom( null );\n      }\n\n      final FileObject transFile = KettleVFS.getInstance( bowl ).getFileObject( fname, parentVariableSpace );","sourceCodeStart":3040,"sourceCodeEnd":3076,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/TransMeta.java#L3040-L3076","documentation":"A KettleXMLException (message key TransMeta.Exception.MissingXMLFilePath) thrown by the TransMeta(Bowl, fname, ...) constructor when the filename argument is blank. Without a file path there is nothing to load, so the constructor fails fast before any VFS access.","triggerScenarios":"new TransMeta(bowl, null, metaStore, rep, true, parentSpace, prompter) or fname = \"\" / whitespace-only.","commonSituations":"Path variables resolved from env/properties that are unset; callers passing the wrong argument (null filename with a repository instead); dynamic path building producing an empty string.","solutions":["Pass a valid, non-blank path to the .ktr file","Validate the filename before constructing TransMeta (StringUtils.isBlank check)","If loading from a repository, use the repository-based TransMeta constructor instead","Trace where fname comes from and fix the upstream resolution"],"exampleFix":"// before\nTransMeta tm = new TransMeta(bowl, config.getProperty(\"trans.path\"), metaStore, null, true, vars, null);\n// after\nString fname = config.getProperty(\"trans.path\");\nif (StringUtils.isBlank(fname)) throw new IllegalArgumentException(\"trans.path is required\");\nTransMeta tm = new TransMeta(bowl, fname, metaStore, null, true, vars, null);","handlingStrategy":"validation","validationCode":"if (fname == null || fname.isBlank()) throw new IllegalArgumentException(\"Transformation file path must be provided\");","typeGuard":null,"tryCatchPattern":"try { new TransMeta(bowl, fname, metaStore, rep, true, vars, prompter); } catch (KettleXMLException e) { log.error(\"Missing/invalid trans file path\", e); }","preventionTips":["Validate path inputs before constructing TransMeta","Fail fast on unset config properties feeding fname","Prefer repository-based constructors when loading from a repo"],"tags":["kettle","transformation","xml","missing-argument"],"backgroundTag":"missing-required-argument","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"}