pentaho/pentaho-kettle · error · KettleException

MappingDialog.Exception.UnableToFindRepositoryDirectory

MappingDialog.Exception.UnableToFindRepositoryDirectory

Error message

MappingDialog.Exception.UnableToFindRepositoryDirectory

What it means

Thrown by MappingDialog.loadTransformation when repository.findDirectory(realDirectory) returns null — the directory part of the mapping path exists syntactically but not in the connected repository. Loading of the sub-transformation is aborted.

Solutions

  1. Verify the folder exists in the currently connected repository and reconnect to the correct one
  2. Re-pick the mapping via the dialog's browse button to refresh the stored path
  3. Correct the directory path in the Mapping step settings after any repository reorganization
  4. Check for environment-specific path differences across dev/test/prod repositories

Example fix

// before
mapping.setDirectoryPath("/deploy/old");
// after
mapping.setDirectoryPath("/deploy/current"); // folder confirmed in connected repo
Defensive patterns

Strategy: validation

Validate before calling

if (repository != null && repository.findDirectory(dirPath) == null) throw new IllegalStateException("Mapping directory missing in repository: " + dirPath);

Try / catch

try { loadTransformation(); } catch (KettleException e) { // guide user to reconnect or re-browse the mapping }

Prevention

When it happens

Trigger: getData or ok invokes loadTransformation; the directory parsed from the mapping path is not found by the current repository connection.

Common situations: The sub-transformation folder was renamed/deleted, the developer is connected to a different repository (dev vs prod), or the mapping path references another project's folder.

Related errors


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

Appendix: source

Thrown at ui/src/main/java/org/pentaho/di/ui/trans/steps/mapping/MappingDialog.java:452

          filename = filename.replace( ".ktr", "" );
          wPath.setText( filename );
        }
        String transPath = transMeta.environmentSubstitute( filename );
        String realTransname = transPath;
        String realDirectory = "";
        int index = transPath.lastIndexOf( "/" );
        if ( index != -1 ) {
          realTransname = transPath.substring( index + 1 );
          realDirectory = transPath.substring( 0, index );
        }

        if ( Utils.isEmpty( realDirectory ) || Utils.isEmpty( realTransname ) ) {
          throw new KettleException(
            BaseMessages.getString( PKG, "MappingDialog.Exception.NoValidMappingDetailsFound" ) );
        }
        RepositoryDirectoryInterface repdir = repository.findDirectory( realDirectory );
        if ( repdir == null ) {
          throw new KettleException( BaseMessages.getString(
            PKG, "MappingDialog.Exception.UnableToFindRepositoryDirectory" ) );
        }
        loadRepositoryTrans( realTransname, repdir );
        break;
      default:
        break;
    }
  }

  private void getByReferenceData( ObjectId transObjectId ) {
    try {
      if ( repository == null ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "MappingDialog.Exception.NotConnectedToRepository.Message" ) );
      }
      RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
      String path = DialogUtils
        .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );

View on GitHub (pinned to f3058517a1)