{"record":{"id":"9abf7f7f6319fbf2","repo":"pentaho/pentaho-kettle","slug":"changefileencodingmeta-exception","errorCode":"ChangeFileEncodingMeta.Exception.UnexpectedErrorReadingStepInfo","errorMessage":"ChangeFileEncodingMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"ChangeFileEncodingMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/changefileencoding/ChangeFileEncodingMeta.java","lineNumber":210,"sourceCode":"      throw new KettleXMLException(\n          BaseMessages.getString( PKG, \"ChangeFileEncodingMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )\n    throws KettleException {\n    try {\n      filenamefield = rep.getStepAttributeString( id_step, \"filenamefield\" );\n      targetfilenamefield = rep.getStepAttributeString( id_step, \"targetfilenamefield\" );\n      sourceencoding = rep.getStepAttributeString( id_step, \"sourceencoding\" );\n      targetencoding = rep.getStepAttributeString( id_step, \"targetencoding\" );\n\n      addsourceresultfilenames = rep.getStepAttributeBoolean( id_step, \"addsourceresultfilenames\" );\n      addtargetresultfilenames = rep.getStepAttributeBoolean( id_step, \"addtargetresultfilenames\" );\n      createparentfolder = rep.getStepAttributeBoolean( id_step, \"createparentfolder\" );\n\n    } catch ( Exception e ) {\n      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(","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/changefileencoding/ChangeFileEncodingMeta.java#L192-L228","documentation":"ChangeFileEncodingMeta.readRep() wraps repository reads of the step's attributes in a try/catch and rethrows as KettleException with this message when loading the step's metadata from a Pentaho Repository database. Any repository/storage exception while reading step attributes produces this error.","triggerScenarios":"In readRep: rep.getStepAttributeString/getStepAttributeBoolean calls throw — database connectivity loss, repository schema mismatch, or corrupt r_step_attribute rows for this step.","commonSituations":"Repository database down or migrated mid-load; upgrading Pentaho against an older repository schema; corrupted attribute rows after a failed save.","solutions":["Check repository database connectivity and credentials.","Verify the repository schema version matches the Pentaho version (run the upgrade scripts).","Re-open the transformation; if the step is corrupt, delete and recreate the step.","Inspect the chained cause exception for the concrete SQL error."],"exampleFix":"// before: loading with stale connection\nTransMeta tm = new TransMeta(rep, \"my transform\");\n// after: verify connectivity first\nif ( !rep.isConnected() ) { rep.connect(); }\nTransMeta tm = new TransMeta(rep, \"my transform\");","handlingStrategy":"try-catch","validationCode":"// Verify repository connectivity before loading\nif ( !rep.test() ) { throw new IllegalStateException( \"Repository unreachable\" ); }","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta tm = new TransMeta( rep, \"my transform\", null );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"UnexpectedErrorReadingStepInfo\" ) ) {\n    log.error( \"Repository read failed for step: {}\", e.getCause(), e );\n  } else { throw e; }\n}","preventionTips":["Run repository schema upgrade scripts after Pentaho version upgrades.","Monitor repository database health before scheduled runs.","Keep local .ktr backups of repository transformations."],"tags":["etl","kettle","repository","database"],"backgroundTag":"database-query-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"}