pentaho/pentaho-kettle · error · KettleXMLException

JobEntryCopyMoveResultFilenames.CanNotSaveToRep

Error message

JobEntryCopyMoveResultFilenames.CanNotSaveToRep

What it means

JobEntryCopyMoveResultFilenames.saveRep throws this KettleXMLException (wrapping KettleDatabaseException) when saving the entry's attributes to the repository fails. The message includes id_job and the DB error message. Note the exception type is inconsistent with the operation (save), which is a known quirk of this class.

Solutions

  1. Restore repository DB connectivity (check network, credentials) and retry the save.
  2. Ensure the repository is not read-only and the user has write permissions.
  3. Shorten values that may exceed R_JOBENTRY_ATTRIBUTE column sizes.
  4. Inspect dbe.getMessage() in the exception for the failing statement.
Defensive patterns

Strategy: try-catch

Validate before calling

if (!rep.isConnected()) throw new IllegalStateException("Connect repository before saveRep");
if (destinationFolder != null && destinationFolder.length() > 2000) throw new IllegalArgumentException("Destination folder value too long");

Try / catch

try {
  jobEntry.saveRep(rep, metaStore, id_job);
} catch (KettleXMLException e) {
  logError("Repository save failed for id_job=" + id_job + ": " + e.getMessage(), e);
  // retry after restoring DB connectivity; the job remains in memory
}

Prevention

When it happens

Trigger: Calling saveRep when rep.saveJobEntryAttribute fails — repository connection lost, DB constraint violation (e.g. boolean/string value too long), or invalid object id — while persisting 'OverwriteFile', 'CreateDestinationFolder', 'RemovedSourceFilename', 'AddDestinationFilename' flags.

Common situations: Saving a job to a repository whose connection timed out; DB in read-only mode; column length exceeded by destination folder paths; concurrent repository access locking.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/copymoveresultfilenames/JobEntryCopyMoveResultFilenames.java:241

      rep.saveJobEntryAttribute( id_job, getObjectId(), "wildcardexclude", wildcardexclude );

      rep.saveJobEntryAttribute( id_job, getObjectId(), "destination_folder", destination_folder );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "nr_errors_less_than", nr_errors_less_than );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "success_condition", success_condition );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_date", add_date );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_time", add_time );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "SpecifyFormat", SpecifyFormat );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "date_time_format", date_time_format );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "AddDateBeforeExtension", AddDateBeforeExtension );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "action", action );

      rep.saveJobEntryAttribute( id_job, getObjectId(), "OverwriteFile", OverwriteFile );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "CreateDestinationFolder", CreateDestinationFolder );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "RemovedSourceFilename", RemovedSourceFilename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "AddDestinationFilename", AddDestinationFilename );

    } catch ( KettleDatabaseException dbe ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "JobEntryCopyMoveResultFilenames.CanNotSaveToRep", "" + id_job, dbe.getMessage() ) );
    }
  }

  public void setSpecifyWildcard( boolean specifywildcard ) {
    this.specifywildcard = specifywildcard;
  }

  public boolean isSpecifyWildcard() {
    return specifywildcard;
  }

  public void setFoldername( String foldername ) {
    this.foldername = foldername;
  }

  public String getFoldername() {
    return foldername;

View on GitHub (pinned to f3058517a1)