pentaho/pentaho-kettle · error · KettleException

LoadFileInputMeta.Exception.ErrorSavingToRepository

LoadFileInputMeta.Exception.ErrorSavingToRepository

Error message

Unable to save step information to the repository for id_step={0}

What it means

Thrown from LoadFileInputMeta.saveRep when persisting the step's settings back to the Kettle repository. Any Exception from rep.saveStepAttribute(...) is wrapped in a KettleException with message key LoadFileInputMeta.Exception.ErrorSavingToRepository, formatted with the failing id_step. It indicates the metadata write to the repository failed.

Solutions

  1. Check the wrapped cause (usually SQLException) — verify repository DB is writable, reachable, and not out of space.
  2. Confirm you are not saving to a read-only replica or a file repository opened without write permissions.
  3. Refresh the transformation from the repository and re-apply the change to resolve stale/conflicting versions.
  4. As a workaround, export the transformation to .ktr XML locally, fix the repository issue, then re-import.

Example fix

// before
// saving to read-only DB replica -> KettleException id_step=123
// after
// point repository connection at the primary (writable) DB node, then save again
Defensive patterns

Strategy: try-catch

Validate before calling

// Before saving, confirm the repository connection is writable:
if (!repo.isConnected()) repo.connect(...);
// optionally: attempt a no-op save on a scratch object to verify write access

Try / catch

try {
  transMeta.saveRep(repo, metaStore, transMeta.getObjectId() /* ... */);
} catch (KettleException e) {
  if (e.getMessage().contains("ErrorSavingToRepository")) {
    log.error("Repository write failed for step: " + e.getCause(), e);
    // export to .ktr locally so no work is lost, fix repo, retry
  } else { throw e; }
}

Prevention

When it happens

Trigger: Clicking Save on a transformation in a repository-backed setup while the repository DB is read-only, out of space, disconnected, or a unique/foreign key constraint fails on r_step_attribute inserts; also concurrent modification of the same transformation by two users.

Common situations: Repository database read-only replica; disk full on the DB server; locked transformation (another user holding it); repository connection timeout during save.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInputMeta.java:978

        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_LENGTH_REP, field.getLength() );
        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_PRECISION_REP, field.getPrecision() );
        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_TRIM_TYPE_REP, field.getTrimTypeCode() );
        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_REPEAT_REP, field.isRepeated() );
      }
      rep.saveStepAttribute( idTransformation, idStep, IS_IN_FIELDS, fileInField );

      rep.saveStepAttribute( idTransformation, idStep, DYNAMIC_FILENAME_FIELD, dynamicFilenameField );
      rep.saveStepAttribute( idTransformation, idStep, SHORT_FILE_FIELD_NAME, shortFileFieldName );
      rep.saveStepAttribute( idTransformation, idStep, PATH_FIELD_NAME, pathFieldName );
      rep.saveStepAttribute( idTransformation, idStep, HIDDEN_FIELD_NAME, hiddenFieldName );
      rep.saveStepAttribute( idTransformation, idStep, LAST_MODIFICATION_TIME_FIELD_NAME,
          lastModificationTimeFieldName );
      rep.saveStepAttribute( idTransformation, idStep, URI_NAME_FIELD_NAME, uriNameFieldName );
      rep.saveStepAttribute( idTransformation, idStep, ROOT_URI_NAME_FIELD_NAME, rootUriNameFieldName );
      rep.saveStepAttribute( idTransformation, idStep, EXTENSION_FIELD_NAME, extensionFieldName );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "LoadFileInputMeta.Exception.ErrorSavingToRepository", ""
          + idStep ), e );
    }
  }

  public FileInputList getFiles( Bowl bowl, VariableSpace space ) {
    return FileInputList.createFileList( bowl, space, fileName, fileMask, excludeFileMask, fileRequired,
        includeSubFolderBoolean() );
  }

  private boolean[] includeSubFolderBoolean() {
    int len = fileName.length;
    boolean[] includeSubFolderBoolean = new boolean[len];
    for ( int i = 0; i < len; i++ ) {
      includeSubFolderBoolean[i] = YES.equalsIgnoreCase( includeSubFolders[i] );
    }
    return includeSubFolderBoolean;
  }

View on GitHub (pinned to f3058517a1)