{"record":{"id":"74856c3b0bcd343d","repo":"pentaho/pentaho-kettle","slug":"loadfileinputmeta-exception-errorsavingtorepository","errorCode":"LoadFileInputMeta.Exception.ErrorSavingToRepository","errorMessage":"Unable to save step information to the repository for id_step={0}","messagePattern":"Unable to save step information to the repository for id_step=(.+?)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInputMeta.java","lineNumber":978,"sourceCode":"        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_LENGTH_REP, field.getLength() );\n        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_PRECISION_REP, field.getPrecision() );\n        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_TRIM_TYPE_REP, field.getTrimTypeCode() );\n        rep.saveStepAttribute( idTransformation, idStep, i, FIELD_REPEAT_REP, field.isRepeated() );\n      }\n      rep.saveStepAttribute( idTransformation, idStep, IS_IN_FIELDS, fileInField );\n\n      rep.saveStepAttribute( idTransformation, idStep, DYNAMIC_FILENAME_FIELD, dynamicFilenameField );\n      rep.saveStepAttribute( idTransformation, idStep, SHORT_FILE_FIELD_NAME, shortFileFieldName );\n      rep.saveStepAttribute( idTransformation, idStep, PATH_FIELD_NAME, pathFieldName );\n      rep.saveStepAttribute( idTransformation, idStep, HIDDEN_FIELD_NAME, hiddenFieldName );\n      rep.saveStepAttribute( idTransformation, idStep, LAST_MODIFICATION_TIME_FIELD_NAME,\n          lastModificationTimeFieldName );\n      rep.saveStepAttribute( idTransformation, idStep, URI_NAME_FIELD_NAME, uriNameFieldName );\n      rep.saveStepAttribute( idTransformation, idStep, ROOT_URI_NAME_FIELD_NAME, rootUriNameFieldName );\n      rep.saveStepAttribute( idTransformation, idStep, EXTENSION_FIELD_NAME, extensionFieldName );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"LoadFileInputMeta.Exception.ErrorSavingToRepository\", \"\"\n          + idStep ), e );\n    }\n  }\n\n  public FileInputList getFiles( Bowl bowl, VariableSpace space ) {\n    return FileInputList.createFileList( bowl, space, fileName, fileMask, excludeFileMask, fileRequired,\n        includeSubFolderBoolean() );\n  }\n\n  private boolean[] includeSubFolderBoolean() {\n    int len = fileName.length;\n    boolean[] includeSubFolderBoolean = new boolean[len];\n    for ( int i = 0; i < len; i++ ) {\n      includeSubFolderBoolean[i] = YES.equalsIgnoreCase( includeSubFolders[i] );\n    }\n    return includeSubFolderBoolean;\n  }\n","sourceCodeStart":960,"sourceCodeEnd":996,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInputMeta.java#L960-L996","documentation":"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.","triggerScenarios":"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.","commonSituations":"Repository database read-only replica; disk full on the DB server; locked transformation (another user holding it); repository connection timeout during save.","solutions":["Check the wrapped cause (usually SQLException) — verify repository DB is writable, reachable, and not out of space.","Confirm you are not saving to a read-only replica or a file repository opened without write permissions.","Refresh the transformation from the repository and re-apply the change to resolve stale/conflicting versions.","As a workaround, export the transformation to .ktr XML locally, fix the repository issue, then re-import."],"exampleFix":"// before\n// saving to read-only DB replica -> KettleException id_step=123\n// after\n// point repository connection at the primary (writable) DB node, then save again","handlingStrategy":"try-catch","validationCode":"// Before saving, confirm the repository connection is writable:\nif (!repo.isConnected()) repo.connect(...);\n// optionally: attempt a no-op save on a scratch object to verify write access","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.saveRep(repo, metaStore, transMeta.getObjectId() /* ... */);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ErrorSavingToRepository\")) {\n    log.error(\"Repository write failed for step: \" + e.getCause(), e);\n    // export to .ktr locally so no work is lost, fix repo, retry\n  } else { throw e; }\n}","preventionTips":["Ensure the repository points to a writable primary, not a read-only replica.","Watch DB disk space and connection pools on the repository server.","Avoid concurrent edits of the same transformation by multiple users.","Save to XML first when repository health is uncertain."],"tags":["repository","database","metadata","kettle"],"backgroundTag":"database-write-failed","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"}