{"record":{"id":"6cee4cd4bf0ce7f3","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-value-from-repository-with-id-value","errorCode":null,"errorMessage":"Unable to load Value from repository with id_value=","messagePattern":"Unable to load Value from repository with id_value=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryValueDelegate.java","lineNumber":85,"sourceCode":"              valueMeta.setConversionMask( ValueMetaAndData.VALUE_REPOSITORY_INTEGER_CONVERSION_MASK );\n              break;\n            default:\n              break;\n          }\n\n          String string = r.getString( \"VALUE_STR\", null );\n          valueMetaAndData.setValueData( stringValueMeta.convertDataUsingConversionMetaData( string ) );\n\n          // OK, now comes the dirty part...\n          // We want the defaults back on there...\n          //\n          valueMeta = ValueMetaFactory.createValueMeta( name, valueMeta.getType() );\n        }\n      }\n\n      return valueMetaAndData;\n    } catch ( KettleException dbe ) {\n      throw new KettleException( \"Unable to load Value from repository with id_value=\" + id_value, dbe );\n    }\n  }\n\n}\n","sourceCodeStart":67,"sourceCodeEnd":90,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryValueDelegate.java#L67-L90","documentation":"loadValueMetaAndData() reads a value (with its metadata) from the repository by id_value. Any KettleException encountered during that read is wrapped as KettleException('Unable to load Value from repository with id_value=<id>', cause). It indicates the value row could not be read or its metadata could not be reconstructed.","triggerScenarios":"Calling valueDelegate.loadValueMetaAndData(id_value) with an id that has no row in R_VALUE, or when ValueMetaFactory/createValueMeta or the underlying JDBC read throws.","commonSituations":"Corrupt or partially deleted repository rows (orphaned id_value references); transformation/repository schema mismatch after upgrade; pointing at the wrong repository database.","solutions":["Inspect the wrapped cause for the actual SQL/parse error","Verify the R_VALUE row for that id_value exists and matches the repository schema version","Run repository upgrade/repair (repository connection 'Upgrade' option) if schema mismatch is suspected"],"exampleFix":"// before\nRowMetaAndData v = repo.valueDelegate.loadValueMetaAndData(idValue);\n// after\nRowMetaAndData v;\ntry {\n  v = repo.valueDelegate.loadValueMetaAndData(idValue);\n} catch (KettleException e) {\n  throw new KettleException(\"Value \" + idValue + \" missing/corrupt in repository: \" + e.getCause().getMessage(), e);\n}","handlingStrategy":"try-catch","validationCode":"RowMetaAndData row = repository.connectionDelegate.getOneRow(\"R_VALUE\", \"ID_VALUE\", id_value);\nif (row == null) throw new KettleException(\"No R_VALUE row for id_value=\" + id_value);","typeGuard":null,"tryCatchPattern":"try { value = delegate.loadValueMetaAndData(id); } catch (KettleException e) { throw new KettleException(\"Corrupt/missing value id=\" + id + \": \" + e.getCause(), e); }","preventionTips":["Never delete repository rows directly with SQL — use repository APIs to keep referential integrity","Keep the repository schema in sync with the Pentaho version","Validate referenced ids before loading"],"tags":["repository","database","corrupt-data","persistence"],"backgroundTag":"record-not-found","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"}