{"record":{"id":"326f26c21275f4b5","repo":"pentaho/pentaho-kettle","slug":"purrepository-error-0008-transformation-path-invalid","errorCode":"PurRepository.ERROR_0008_TRANSFORMATION_PATH_INVALID","errorMessage":"PurRepository.ERROR_0008_TRANSFORMATION_PATH_INVALID (localized, takes transName)","messagePattern":"PurRepository\\.ERROR_0008_TRANSFORMATION_PATH_INVALID \\(localized, takes transName\\)","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":2452,"sourceCode":"  throws KettleException {\n    String absPath = null;\n    try {\n      // if transName is empty, we cannot load the transformation - the transformation path was likely not provided\n      // by the user\n      if ( StringUtils.isBlank( transName ) ) {\n        throw new KettleFileException( BaseMessages.getString( PKG,\n          \"PurRepository.ERROR_0007_TRANSFORMATION_NAME_MISSING\" ) );\n      }\n      try {\n        absPath = getPath( transName, parentDir, RepositoryObjectType.TRANSFORMATION );\n      } catch ( Exception e ) {\n        // ignore and handle null value below\n      }\n      // if absPath is empty, we cannot load the transformation - the path provided by the user was likely defined as a\n      // variable that is not available at runtime\n      if ( StringUtils.isBlank( absPath )  ) {\n        // Couldn't resolve path, throw an exception\n        throw new KettleFileException( BaseMessages.getString( PKG,\n          \"PurRepository.ERROR_0008_TRANSFORMATION_PATH_INVALID\", transName ) );\n      }\n\n      RepositoryFile file;\n      NodeRepositoryFileData data = null;\n      ObjectRevision revision = null;\n\n      readWriteLock.readLock().lock();\n      try {\n        file = pur.getFile( absPath );\n        if ( versionId != null ) {\n          // need to go back to server to get versioned info\n          file = pur.getFileAtVersion( file.getId(), versionId );\n        }\n\n        // if file is null, we cannot load the transformation - the provided path provided by the user is likely not a\n        // valid file\n        if ( file == null ) {","sourceCodeStart":2434,"sourceCodeEnd":2470,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L2434-L2470","documentation":"Thrown by PurRepository.loadTransformation when the path computed from the name cannot be resolved — typically because the name contained a variable that is not defined at runtime, leaving absPath blank. ERROR_0008_TRANSFORMATION_PATH_INVALID includes the original name for diagnostics.","triggerScenarios":"loadTransformation called with a name containing ${INTERNAL_...} or user variables that the repository cannot resolve; getPath() returns null/empty because the variable substitution yields a blank path.","commonSituations":"Using ${Internal.Job.Filename.Directory} outside a job context; exporting jobs that reference variables not set on the target machine; runtime environments missing variable definitions from kettle.properties.","solutions":["Define the referenced variables (kettle.properties, job parameters) before loading","Replace variable-based names with absolute repository paths when loading outside the variable's scope","Check that the transformation name/path resolves correctly and log it before calling loadTransformation"],"exampleFix":"// before\nString name = \"${Internal.Job.Filename.Directory}/mytrans\"; // variable unset at runtime\nTransMeta tm = repository.loadTransformation(name, null, monitor, null, false);\n// after\nString name = \"/home/admin/mytrans\"; // or ensure variable defined in kettle.properties\nTransMeta tm = repository.loadTransformation(name, null, monitor, null, false);","handlingStrategy":"validation","validationCode":"String resolved = resolveVariables(transName); // e.g. environment.getVariable(...)\nif (resolved == null || resolved.trim().isEmpty() || resolved.contains(\"${\")) {\n  throw new IllegalArgumentException(\"Transformation path unresolved: \" + transName);\n}","typeGuard":null,"tryCatchPattern":"try {\n  return repository.loadTransformation(transName, dir, monitor, revision, readOnly);\n} catch (KettleFileException e) {\n  if (String.valueOf(e.getMessage()).contains(\"TRANSFORMATION_PATH_INVALID\")) {\n    log.error(\"Could not resolve path for \" + transName + \"; check variable definitions\", e);\n  }\n  throw e;\n}","preventionTips":["Define all referenced variables in kettle.properties or job parameters","Prefer absolute repository paths over variable-based paths when loading outside job scope","Log the resolved path before loading to catch blank substitutions"],"tags":["pentaho","kettle","variables","path-resolution"],"backgroundTag":"invalid-argument-value","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"}