{"record":{"id":"6cb2ad603f23b1f5","repo":"pentaho/pentaho-kettle","slug":"ldifinputmeta-exception-errorsavingtorepository","errorCode":"LDIFInputMeta.Exception.ErrorSavingToRepository","errorMessage":"LDIFInputMeta.Exception.ErrorSavingToRepository","messagePattern":"LDIFInputMeta\\.Exception\\.ErrorSavingToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java","lineNumber":1023,"sourceCode":"        rep.saveStepAttribute( id_transformation, id_step, i, \"field_decimal\", field.getDecimalSymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_group\", field.getGroupSymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_length\", field.getLength() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_precision\", field.getPrecision() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_trim_type\", field.getTrimTypeCode() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_repeat\", field.isRepeated() );\n\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"shortFileFieldName\", shortFileFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"pathFieldName\", pathFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"hiddenFieldName\", hiddenFieldName );\n      rep.saveStepAttribute(\n        id_transformation, id_step, \"lastModificationTimeFieldName\", lastModificationTimeFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"uriNameFieldName\", uriNameFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"sizeFieldName\", sizeFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"rootUriNameFieldName\", rootUriNameFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"extensionFieldName\", extensionFieldName );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"LDIFInputMeta.Exception.ErrorSavingToRepository\", \"\" + id_step ), e );\n    }\n  }\n\n  public FileInputList getFiles( Bowl bowl, VariableSpace space ) {\n    return FileInputList.createFileList(\n      bowl, space, fileName, fileMask, excludeFileMask, fileRequired, 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":1005,"sourceCodeEnd":1041,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java#L1005-L1041","documentation":"LDIFInputMeta.saveRep wraps repository persistence in try/catch and throws KettleException('Error saving step info to repository' + id_step) when any rep.saveStepAttribute call fails. This happens when saving a transformation to a Pentaho Repository and the write of the step's settings fails.","triggerScenarios":"Saving a transformation in Spoon to a repository DB where saveStepAttribute fails — DB write error, constraint violation, connection loss, read-only account, or missing id_step.","commonSituations":"Repository account lacks INSERT/UPDATE permissions; database disk full or tablespace exceeded; connection dropped during save; repository object locked or transformation deleted concurrently.","solutions":["Check the repository DB connection and retry the save.","Verify the repository user has write (INSERT/UPDATE) privileges on repository tables.","Check DB server logs/disk space for write failures.","Save the transformation locally as .ktr as a workaround, then re-save once the repository is healthy."],"exampleFix":"// before: silent failure at save time in Spoon\n// after: guard before building\nif (!rep.getConnection().isValid(5)) {\n  throw new KettleException(\"Repository DB not writable; save locally instead\");\n}","handlingStrategy":"try-catch","validationCode":"if (!rep.getConnection().isValid(5) || !rep.hasWritePermission()) {\n  throw new KettleException(\"Repository not writable; save locally instead\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.saveRep(rep, metaStore, \"my transform\", null);\n} catch (KettleException e) {\n  log.error(\"Repository save failed; exporting to .ktr as fallback\", e);\n  transMeta.exportToFile(\"backup.ktr\");\n}","preventionTips":["Ensure repository user has write privileges","Monitor DB disk space and connection health","Save local .ktr copies as a fallback"],"tags":["kettle","pentaho","repository","database","write-failed"],"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"}