{"record":{"id":"89310311fe9f4aea","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-893103","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step=","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/fixedinput/FixedInputMeta.java","lineNumber":246,"sourceCode":"\n      for ( int i = 0; i < fieldDefinition.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldDefinition[i].getName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\",\n          ValueMetaFactory.getValueMetaName( fieldDefinition[i].getType() ) );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_format\", fieldDefinition[i].getFormat() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_trim_type\", ValueMetaString\n          .getTrimTypeCode( fieldDefinition[i].getTrimType() ) );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_currency\", fieldDefinition[i].getCurrency() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_decimal\", fieldDefinition[i].getDecimal() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_group\", fieldDefinition[i].getGrouping() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_width\", fieldDefinition[i].getWidth() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_length\", fieldDefinition[i].getLength() );\n        rep\n          .saveStepAttribute( id_transformation, id_step, i, \"field_precision\", fieldDefinition[i]\n            .getPrecision() );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to save step information to the repository for id_step=\" + id_step, e );\n    }\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    try {\n      for ( int i = 0; i < fieldDefinition.length; i++ ) {\n        FixedFileInputField field = fieldDefinition[i];\n\n        ValueMetaInterface valueMeta = ValueMetaFactory.createValueMeta( field.getName(), field.getType() );\n        valueMeta.setConversionMask( field.getFormat() );\n        valueMeta.setTrimType( field.getTrimType() );\n        valueMeta.setLength( field.getLength() );\n        valueMeta.setPrecision( field.getPrecision() );\n        valueMeta.setConversionMask( field.getFormat() );\n        valueMeta.setDecimalSymbol( field.getDecimal() );\n        valueMeta.setGroupingSymbol( field.getGrouping() );","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/fixedinput/FixedInputMeta.java#L228-L264","documentation":"FixedInputMeta.saveRep wraps repository write failures while persisting the step's filename, layout, and per-field definitions in a KettleException with this message plus id_step. The cause carries the underlying repository error.","triggerScenarios":"saveRep when any saveStepAttribute call throws — connection loss, permissions, constraint violation, or null fieldDefinition entries (allocate not called with the right size).","commonSituations":"Saving a transformation to a database repository that has become unavailable or read-only; insufficient privileges; a step whose field list was corrupted in memory after a failed XML load.","solutions":["Read the chained cause to identify connection vs permission vs data errors","Confirm the repository user has INSERT/UPDATE rights and the repository is online/writable","Reload the transformation from the repository before re-saving to reset in-memory metadata","Retry the save after reconnecting; if persistent, save locally as .ktr and diagnose the repository"],"exampleFix":"// before\nfieldDefinition[i].getLength(); // NPE if fieldDefinition was never allocated\n// after\nif ( fieldDefinition != null && fieldDefinition[i] != null ) {\n  rep.saveStepAttribute( id_transformation, id_step, i, \"field_length\", fieldDefinition[i].getLength() );\n}","handlingStrategy":"try-catch","validationCode":"// before save\nif ( meta.getFieldDefinition() == null || meta.getFieldDefinition().length == 0 ) {\n  throw new IllegalStateException( \"FixedInput has no field definitions to save\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.saveRep( rep, metaStore, transName );\n} catch ( KettleException e ) {\n  logError( \"Save failed (id_step=\" + e.getMessage() + \"): \" + e.getCause(), e );\n}","preventionTips":["Ensure allocate() was called before saving","Confirm repository write access and disk space","Reload metadata from repository before re-saving","Export a local .ktr copy before risky repository operations"],"tags":["pdi","kettle","repository","metadata-save"],"backgroundTag":"file-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"}