{"record":{"id":"8314b3679fcf83bb","repo":"pentaho/pentaho-kettle","slug":"changefileencodingmeta-exception-unabletosavestepinfo","errorCode":"ChangeFileEncodingMeta.Exception.UnableToSaveStepInfo","errorMessage":"ChangeFileEncodingMeta.Exception.UnableToSaveStepInfo","messagePattern":"ChangeFileEncodingMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/changefileencoding/ChangeFileEncodingMeta.java","lineNumber":228,"sourceCode":"      throw new KettleException(\n          BaseMessages.getString( PKG, \"ChangeFileEncodingMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"filenamefield\", filenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetfilenamefield\", targetfilenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"sourceencoding\", sourceencoding );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetencoding\", targetencoding );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"addsourceresultfilenames\", addsourceresultfilenames );\n      rep.saveStepAttribute( id_transformation, id_step, \"addtargetresultfilenames\", addtargetresultfilenames );\n      rep.saveStepAttribute( id_transformation, id_step, \"createparentfolder\", createparentfolder );\n\n    } catch ( Exception e ) {\n      throw new KettleException(\n          BaseMessages.getString( PKG, \"ChangeFileEncodingMeta.Exception.UnableToSaveStepInfo\" ) + id_step, e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,\n      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,\n      IMetaStore metaStore ) {\n    CheckResult cr;\n    String error_message = \"\";\n\n    if ( Utils.isEmpty( filenamefield ) ) {\n      error_message = BaseMessages.getString( PKG, \"ChangeFileEncodingMeta.CheckResult.FileFieldMissing\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta );\n      remarks.add( cr );\n    } else {\n      error_message = BaseMessages.getString( PKG, \"ChangeFileEncodingMeta.CheckResult.FileFieldOK\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_OK, error_message, stepMeta );\n      remarks.add( cr );","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/changefileencoding/ChangeFileEncodingMeta.java#L210-L246","documentation":"ChangeFileEncodingMeta.saveRep() wraps repository writes of the step's attributes in a try/catch and rethrows as KettleException with this message (plus the step id appended) when saving the transformation fails at this step. The failing step's ObjectId is embedded in the message.","triggerScenarios":"In saveRep: rep.saveStepAttribute calls throw — database write failure, connection dropped, read-only repository, or constraint violation in r_step_attribute.","commonSituations":"Repository database is read-only or disk quota exceeded; connection timeout on large transformations; permission denied on the repository for the current user.","solutions":["Check the chained cause for the concrete SQL/database error.","Verify the repository user has write permissions and the database is not read-only.","Retry saving; if connection timeouts persist, increase the connection pool/timeout settings.","Save the transformation locally (.ktr) as a workaround while fixing repository access."],"exampleFix":"// before: saving without checking connection\nrep.save(transMeta, \"desc\", null, true);\n// after: ensure connection\nif ( !rep.isConnected() ) { rep.connect(); }\nrep.save(transMeta, \"desc\", null, true);","handlingStrategy":"try-catch","validationCode":"// Ensure repository is writable before saving\nif ( !rep.isConnected() || rep.isReadOnly() ) { throw new IllegalStateException( \"Repository not writable\" ); }","typeGuard":null,"tryCatchPattern":"try {\n  rep.save( transMeta, \"desc\", null, true );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"UnableToSaveStepInfo\" ) ) {\n    log.error( \"Save failed for step {}: {}\", e.getCause(), e.getMessage() );\n  } else { throw e; }\n}","preventionTips":["Grant repository users write permissions on target directories of the repository.","Watch database disk quotas and connection timeouts for scheduled saves.","Save locally as fallback when repository access is degraded."],"tags":["etl","kettle","repository","database"],"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"}