{"record":{"id":"ba528d267db56aa6","repo":"pentaho/pentaho-kettle","slug":"creditcardvalidatormeta-exception","errorCode":"CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo","errorMessage":"CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo","messagePattern":"CreditCardValidatorMeta\\.Exception\\.UnexpectedErrorReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/credit-card-validator/impl/src/main/java/org/pentaho/di/trans/steps/creditcardvalidator/CreditCardValidatorMeta.java","lineNumber":221,"sourceCode":"      notvalidmsg = XMLHandler.getTagValue( stepnode, \"notvalidmsg\" );\n      onlydigits = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"onlydigits\" ) );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"CreditCardValidatorMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      fieldname = rep.getStepAttributeString( id_step, \"fieldname\" );\n      resultfieldname = rep.getStepAttributeString( id_step, \"resultfieldname\" );\n      cardtype = rep.getStepAttributeString( id_step, \"cardtype\" );\n      notvalidmsg = rep.getStepAttributeString( id_step, \"notvalidmsg\" );\n      onlydigits = rep.getStepAttributeBoolean( id_step, \"onlydigits\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"CreditCardValidatorMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"fieldname\", fieldname );\n      rep.saveStepAttribute( id_transformation, id_step, \"resultfieldname\", resultfieldname );\n      rep.saveStepAttribute( id_transformation, id_step, \"cardtype\", cardtype );\n      rep.saveStepAttribute( id_transformation, id_step, \"notvalidmsg\", notvalidmsg );\n      rep.saveStepAttribute( id_transformation, id_step, \"onlydigits\", onlydigits );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"CreditCardValidatorMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/credit-card-validator/impl/src/main/java/org/pentaho/di/trans/steps/creditcardvalidator/CreditCardValidatorMeta.java#L203-L239","documentation":"CreditCardValidatorMeta.readRep loads step settings from a repository by step id. Any exception while reading step attributes (fieldnames, resultfieldname, cardtype, notvalidmsg, onlydigits) is wrapped in a KettleException with UnexpectedErrorReadingStepInfo and the original cause.","triggerScenarios":"Opening a transformation from a repository where the step's attribute rows are missing/corrupt, or the repository connection fails mid-read of getStepAttributeString/getStepAttributeBoolean.","commonSituations":"Corrupt r_kettle_step_attribute rows in the database repository; broken repository connection; step id referencing a deleted/incomplete save.","solutions":["Check the repository database table r_step_attribute for the step's rows","Re-save the step/transformation in Spoon to rewrite its attributes","Test repository connectivity and re-open the transformation"],"exampleFix":"// before\nreadRep(rep, metaStore, staleIdStep, databases);\n// after — verify the step exists before reading\nif (rep.getStepAttributes(staleIdStep) != null) readRep(rep, metaStore, staleIdStep, databases);","handlingStrategy":"try-catch","validationCode":"if (!rep.stepExists(idStep)) throw new IllegalStateException(\"Step missing from repository\");","typeGuard":null,"tryCatchPattern":"try { meta.readRep(rep, metaStore, idStep, databases); } catch (KettleException e) { logError(\"Repository read failed: \" + e.getCause()); }","preventionTips":["Verify repository connectivity before opening transformations","Avoid sharing step ObjectIds across deletion/recreation cycles"],"tags":["kettle","pdi","repository"],"backgroundTag":"repository-read-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"}