{"record":{"id":"8ada623de1750489","repo":"pentaho/pentaho-kettle","slug":"creditcardvalidatormeta-exception-unabletosavestepinfo","errorCode":"CreditCardValidatorMeta.Exception.UnableToSaveStepInfo","errorMessage":"CreditCardValidatorMeta.Exception.UnableToSaveStepInfo","messagePattern":"CreditCardValidatorMeta\\.Exception\\.UnableToSaveStepInfo","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":235,"sourceCode":"      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  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n    String error_message = \"\";\n\n    String realresultfieldname = transMeta.environmentSubstitute( resultfieldname );\n    if ( Utils.isEmpty( realresultfieldname ) ) {\n      error_message = BaseMessages.getString( PKG, \"CreditCardValidatorMeta.CheckResult.ResultFieldMissing\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta );\n      remarks.add( cr );\n    } else {\n      error_message = BaseMessages.getString( PKG, \"CreditCardValidatorMeta.CheckResult.ResultFieldOK\" );","sourceCodeStart":217,"sourceCodeEnd":253,"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#L217-L253","documentation":"CreditCardValidatorMeta.saveRep persists step settings to a repository via saveStepAttribute calls. Any exception during those writes is wrapped in a KettleException with UnableToSaveStepInfo (concatenated with the step id) and the original cause, indicating the step configuration could not be saved.","triggerScenarios":"Saving a transformation while the repository is read-only, the connection drops, or the repository throws while writing attributes for the given id_step.","commonSituations":"Database repository with insufficient write permissions; locked tables; network interruption during save; repository schema version mismatch.","solutions":["Check repository connection and write permissions, then retry saving","Save the transformation to a local .ktr file as a fallback","Inspect the chained cause for the underlying repository error"],"exampleFix":"// before\nrep.saveStepAttribute(idTrans, idStep, \"onlydigits\", onlydigits); // throws\n// after — save to file when repository is unavailable\ntransMeta.setFilename(\"local_copy.ktr\"); transMeta.writeToFile(\"local_copy.ktr\");","handlingStrategy":"try-catch","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");","typeGuard":null,"tryCatchPattern":"try { meta.saveRep(rep, metaStore, idTrans, idStep); } catch (KettleException e) { logError(\"Save failed (step \" + idStep + \"): \" + e.getCause()); }","preventionTips":["Confirm write permissions on the repository before saving","Save a local copy of important transformations","Check the chained cause for the real repository error"],"tags":["kettle","pdi","repository","persistence"],"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"}