{"record":{"id":"35d44e5278635862","repo":"pentaho/pentaho-kettle","slug":"replacestringmeta-exception-unexpectederrorinreadingstepinfo","errorCode":null,"errorMessage":"ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo","messagePattern":"ReplaceStringMeta\\.Exception\\.UnexpectedErrorInReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java","lineNumber":334,"sourceCode":"        fieldInStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, \"in_stream_name\" ), \"\" );\n        fieldOutStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, \"out_stream_name\" ), \"\" );\n        useRegEx[i] =\n          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, \"use_regex\" ), \"\" ) );\n        replaceString[i] = Const.NVL( rep.getStepAttributeString( id_step, i, \"replace_string\" ), \"\" );\n        replaceByString[i] = Const.NVL( rep.getStepAttributeString( id_step, i, \"replace_by_string\" ), \"\" );\n        setEmptyString[i] = rep.getStepAttributeBoolean( id_step, i, \"set_empty_string\", false );\n        replaceFieldByString[i] =\n          Const.NVL( rep.getStepAttributeString( id_step, i, \"replace_field_by_string\" ), \"\" );\n        wholeWord[i] =\n          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, \"whole_world\" ), \"\" ) );\n        caseSensitive[i] =\n          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, \"case_sensitive\" ), \"\" ) );\n        isUnicode[i] =\n          getFlagFromString( Const.NVL( rep.getStepAttributeString( id_step, i, \"is_unicode\" ), \"\" ) );\n\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      for ( int i = 0; i < fieldInStream.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"in_stream_name\", fieldInStream[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"out_stream_name\", fieldOutStream[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"use_regex\", useRegEx[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_string\", replaceString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_by_string\", replaceByString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"set_empty_string\", setEmptyString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"replace_field_by_string\", replaceFieldByString[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"whole_world\", wholeWord[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"case_sensitive\", caseSensitive[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"is_unicode\", isUnicode[i] );\n","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java#L316-L352","documentation":"ReplaceStringMeta.readRep loads the step's per-field attributes from the repository; any exception is wrapped in KettleException 'ReplaceStringMeta.Exception.UnexpectedErrorInReadingStepInfo'. The stored step configuration could not be read back from the repository.","triggerScenarios":"Loading a transformation from a repository where the step attribute rows are missing/corrupt, the repository is unreachable, or stored attribute values are unreadable.","commonSituations":"Repository database outage; partially deleted KETTLE_STEP_ATTRIBUTES rows; schema mismatch after Pentaho upgrade.","solutions":["Verify repository connectivity and retry loading the transformation.","Check the step attribute table rows for the ReplaceString id_step.","Re-save/recreate the transformation step from Spoon to rewrite attributes.","Read the chained cause for the underlying repository error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["repository","persistence","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"}