{"record":{"id":"7d70a082b698de04","repo":"pentaho/pentaho-kettle","slug":"valuemapper0005","errorCode":"VALUEMAPPER0005","errorMessage":"ValueMapperMeta.RuntimeError.UnableToReadRepository.VALUEMAPPER0005","messagePattern":"ValueMapperMeta\\.RuntimeError\\.UnableToReadRepository\\.VALUEMAPPER0005","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/valuemapper/ValueMapperMeta.java","lineNumber":238,"sourceCode":"  }\n\n  @Override\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      fieldToUse = rep.getStepAttributeString( id_step, \"field_to_use\" );\n      targetField = rep.getStepAttributeString( id_step, \"target_field\" );\n      nonMatchDefault = rep.getStepAttributeString( id_step, \"non_match_default\" );\n\n      int nrfields = rep.countNrStepAttributes( id_step, \"source_value\" );\n\n      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        sourceValue[i] = rep.getStepAttributeString( id_step, i, \"source_value\" );\n        targetValue[i] = rep.getStepAttributeString( id_step, i, \"target_value\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"ValueMapperMeta.RuntimeError.UnableToReadRepository.VALUEMAPPER0005\" ), 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      rep.saveStepAttribute( id_transformation, id_step, \"field_to_use\", fieldToUse );\n      rep.saveStepAttribute( id_transformation, id_step, \"target_field\", targetField );\n      rep.saveStepAttribute( id_transformation, id_step, \"non_match_default\", nonMatchDefault );\n\n      for ( int i = 0; i < sourceValue.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"source_value\", getNullOrEmpty( sourceValue[i] ) );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"target_value\", getNullOrEmpty( targetValue[i] ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"ValueMapperMeta.RuntimeError.UnableToSaveRepository.VALUEMAPPER0006\", \"\" + id_step ), e );","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/valuemapper/ValueMapperMeta.java#L220-L256","documentation":"ValueMapperMeta.readRep reads the step's field mappings from the repository; any Exception is rethrown as a KettleException with VALUEMAPPER0005 ('Unable to read from the repository'). It signals repository-level trouble (connection, missing rows, schema) while loading step attributes.","triggerScenarios":"readRep iterates rep.getStepAttributeString(id_step, i, \"source_value\"/\"target_value\") and the repository call throws — repo unreachable, step row missing, or DB error.","commonSituations":"Repository database down or network blip; transformation referencing a step deleted from the repository; repository schema version mismatch after PDI upgrade; insufficient DB permissions.","solutions":["Verify the repository connection (test connection in Spoon) and retry opening the transformation.","Check the wrapped cause for the underlying SQL/connection error and fix DB connectivity or credentials.","Verify the step attribute rows exist in the repository tables (R_STEP_ATTRIBUTE for the id_step).","Run any available repository upgrade/repair; align PDI and repository schema versions.","As a workaround, export the transformation to a .ktr file and run from file instead of repository."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check repository availability before loading:\nif (!rep.connect()) throw new IllegalStateException(\"Repository unreachable\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.load(rep, metaStore, ...);\n} catch (KettleException e) {\n  logError(\"Repository read failed: \" + e.getMessage(), e);\n  // fall back to exported .ktr\n}","preventionTips":["Test repository connectivity before batch operations","Keep an exported .ktr backup of repository-stored transformations","Upgrade repository schema in step with PDI versions"],"tags":["pdi","kettle","repository","valuemapper","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"}