pentaho/pentaho-kettle · error · KettleException

AutoDoc.Exception.UnableToDetermineLocation

AutoDoc.Exception.UnableToDetermineLocation

Error message

AutoDoc.Exception.UnableToDetermineLocation

What it means

AutoDoc.processRow throws KettleException 'AutoDoc.Exception.UnableToDetermineLocation' when, after both the filesystem and repository branches, the ReportSubjectLocation is still null. This happens when the step is neither connected to a repository nor able to resolve the fileName/fileType pair locally. It is a catch-all guard before rendering.

Solutions

  1. Connect the transformation to a repository if the filenames are repository paths.
  2. If running file-based, ensure the fileName values are valid, existing local file paths.
  3. Log/inspect the failing fileName and fileType values in the input rows.
  4. Split the stream so repository objects and local files are handled by appropriately configured AutoDoc steps.

Example fix

// before: repository-style path with no repository connection
fileName = "/home/admin/myTrans"; // running standalone
// after: use a real local file path
fileName = "/opt/kettle/jobs/myTrans.ktr";
Defensive patterns

Strategy: validation

Validate before calling

boolean repoMode = rep != null;
boolean localExists = !repoMode && new File(fileName).exists();
if (!repoMode && !localExists) {
  throw new IllegalStateException("Cannot resolve location: no repository and file missing: " + fileName);
}

Prevention

When it happens

Trigger: getTrans().getRepository() is null (no repository) and the local-file resolution path did not produce a location (e.g. file doesn't exist on disk), leaving location null for the given fileName and fileType.

Common situations: Transformation runs standalone (file-based) but the filename field contains repository-style paths; file deleted from disk after listing; mixed rows where some are repository objects and some are local files.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java:213

      if ( lastSlashIndex < 0 ) {
        fileName = RepositoryDirectory.DIRECTORY_SEPARATOR + fileName;
        lastSlashIndex = 0;
      }

      String directoryName = fileName.substring( 0, lastSlashIndex + 1 );
      String objectName = fileName.substring( lastSlashIndex + 1 );

      RepositoryDirectoryInterface directory = data.tree.findDirectory( directoryName );
      if ( directory == null ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "AutoDoc.Exception.RepositoryDirectoryNotFound", directoryName ) );
      }

      location = new ReportSubjectLocation( null, directory, objectName, objectType );
    }

    if ( location == null ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "AutoDoc.Exception.UnableToDetermineLocation", fileName, fileType ) );
    }

    if ( meta.getOutputType() != OutputType.METADATA ) {
      // Add the file location to the list for later processing in one output report
      //
      data.filenames.add( location );
    } else {
      // Load the metadata from the transformation / job...
      // Output it in one row for each input row
      //
      Object[] outputRow = RowDataUtil.resizeArray( row, data.outputRowMeta.size() );
      int outputIndex = getInputRowMeta().size();

      List<AreaOwner> imageAreaList = null;

      switch ( location.getObjectType() ) {
        case TRANSFORMATION:

View on GitHub (pinned to f3058517a1)