{"record":{"id":"3eb9a291d8202b8d","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-information-from-the-3eb9a2","errorCode":null,"errorMessage":"Unexpected error reading step information from the repository","messagePattern":"Unexpected error reading step information from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/secretkeygenerator/SecretKeyGeneratorMeta.java","lineNumber":343,"sourceCode":"  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      int nrfields = rep.countNrStepAttributes( id_step, \"algorithm\" );\n\n      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        algorithm[i] = rep.getStepAttributeString( id_step, i, \"algorithm\" );\n        scheme[i] = rep.getStepAttributeString( id_step, i, \"scheme\" );\n        secretKeyLength[i] = rep.getStepAttributeString( id_step, i, \"secretKeyLen\" );\n        secretKeyCount[i] = rep.getStepAttributeString( id_step, i, \"secretKeyCount\" );\n      }\n      secretKeyFieldName = rep.getStepAttributeString( id_step, \"secretKeyFieldName\" );\n      secretKeyLengthFieldName = rep.getStepAttributeString( id_step, \"secretKeyLengthFieldName\" );\n      algorithmFieldName = rep.getStepAttributeString( id_step, \"algorithmFieldName\" );\n      outputKeyInBinary = rep.getStepAttributeBoolean( id_step, \"outputKeyInBinary\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error reading step information from the repository\", e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      for ( int i = 0; i < algorithm.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"algorithm\", algorithm[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"scheme\", scheme[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"secretKeyLen\", secretKeyLength[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"secretKeyCount\", secretKeyCount[i] );\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"secretKeyFieldName\", secretKeyFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"secretKeyLengthFieldName\", secretKeyLengthFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"algorithmFieldName\", algorithmFieldName );\n      rep.saveStepAttribute( id_transformation, id_step, \"outputKeyInBinary\", outputKeyInBinary );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to save step information to the repository for id_step=\" + id_step, e );","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/secretkeygenerator/SecretKeyGeneratorMeta.java#L325-L361","documentation":"SecretKeyGeneratorMeta.readRep throws KettleException with this message when any exception occurs while loading the step's attributes from the repository (Repository.getStepAttributeString/Boolean). It wraps repository I/O or driver failures during transformation load.","triggerScenarios":"Calling readRep(Repository rep, ObjectId id_step) when the repository connection fails, id_step is invalid/deleted, or the underlying JDBC/driver throws during attribute reads.","commonSituations":"Database repository unreachable or credentials changed; transformation rows deleted while another user loads them; repository schema version mismatch; network interruption between Pentaho and the repository DB.","solutions":["Check the wrapped cause for the repository/JDBC error and fix connectivity or credentials","Verify id_step still exists: query the repository tables (R_STEP) for the transformation's step id","Test the repository connection in Spoon before loading the transformation","As a fallback, load the transformation from XML/KJB instead of the repository"],"exampleFix":"// before: loading with a stale repository object\ntransMeta.loadTransMeta(rep, id_transformation);\n// after: verify connection first\nif (!rep.connect(\"user\", \"pass\")) throw new KettleException(\"repo unavailable\");\ntransMeta.loadTransMeta(rep, id_transformation);","handlingStrategy":"try-catch","validationCode":"// before readRep\nif (rep == null || id_step == null) throw new KettleException(\"Repository or step id not initialized\");\n// optionally: verify step exists in repository tables","typeGuard":null,"tryCatchPattern":"try { meta.readRep(rep, metaStore, id_step, null); } catch (KettleException e) { log.error(\"Repository read failed: \" + e.getCause(), e); }","preventionTips":["Test repository connectivity before loading transformations","Avoid concurrent delete/load of repository objects","Keep repository schema versioned with your Pentaho release"],"tags":["repository","database","kettle","step-metadata"],"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"}