{"record":{"id":"838b253e497fed3c","repo":"pentaho/pentaho-kettle","slug":"jobentrysimple-error-exception-unableloadrep","errorCode":"JobEntrySimple.Error.Exception.UnableLoadRep","errorMessage":"JobEntrySimple.Error.Exception.UnableLoadRep","messagePattern":"JobEntrySimple\\.Error\\.Exception\\.UnableLoadRep","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/simpleeval/JobEntrySimpleEval.java","lineNumber":390,"sourceCode":"      fieldname = rep.getJobEntryAttributeString( id_jobentry, \"fieldname\" );\n      variablename = rep.getJobEntryAttributeString( id_jobentry, \"variablename\" );\n      fieldtype = getFieldTypeByCode( Const.NVL( rep.getJobEntryAttributeString( id_jobentry, \"fieldtype\" ), \"\" ) );\n      mask = rep.getJobEntryAttributeString( id_jobentry, \"mask\" );\n      comparevalue = rep.getJobEntryAttributeString( id_jobentry, \"comparevalue\" );\n      minvalue = rep.getJobEntryAttributeString( id_jobentry, \"minvalue\" );\n      maxvalue = rep.getJobEntryAttributeString( id_jobentry, \"maxvalue\" );\n      successcondition =\n        getSuccessConditionByCode( Const.NVL(\n          rep.getJobEntryAttributeString( id_jobentry, \"successcondition\" ), \"\" ) );\n      successnumbercondition =\n        getSuccessNumberConditionByCode( Const.NVL( rep.getJobEntryAttributeString(\n          id_jobentry, \"successnumbercondition\" ), \"\" ) );\n      successbooleancondition =\n        getSuccessBooleanConditionByCode( Const.NVL( rep.getJobEntryAttributeString(\n          id_jobentry, \"successbooleancondition\" ), \"\" ) );\n      successwhenvarset = rep.getJobEntryAttributeBoolean( id_jobentry, \"successwhenvarset\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntrySimple.Error.Exception.UnableLoadRep\" )\n        + id_jobentry, dbe );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"valuetype\", getValueTypeCode( valuetype ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"fieldname\", fieldname );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"variablename\", variablename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"fieldtype\", getFieldTypeCode( fieldtype ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"mask\", mask );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"comparevalue\", comparevalue );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"minvalue\", minvalue );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"maxvalue\", maxvalue );\n      rep.saveJobEntryAttribute(\n        id_job, getObjectId(), \"successcondition\", getSuccessConditionCode( successcondition ) );\n      rep","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/simpleeval/JobEntrySimpleEval.java#L372-L408","documentation":"JobEntrySimpleEval.loadRep wraps any KettleException raised while reading the job entry's attributes ('fieldname', 'successnumbercondition', 'successbooleancondition', 'successwhenvarset', etc.) from the repository and rethrows it as a KettleException with the UnableLoadRep message plus the id_jobentry. It indicates the persisted metadata for this 'simple evaluation' job entry could not be read from the repository database.","triggerScenarios":"Calling loadRep on a JobEntrySimpleEval when Repository.getJobEntryAttributeString/getJobEntryAttributeBoolean throws KettleException - typically a broken repository DB connection, missing table rows, or a corrupt/locked repository.","commonSituations":"Repository database is down or credentials changed while opening a job; the job entry row was deleted or corrupted; schema mismatch after a Pentaho version upgrade; network interruption mid-load.","solutions":["Verify the repository database connection (test connection, credentials, network) and retry opening the job.","Check that the job and job entry rows (id_jobentry) exist and are intact in the repository tables (R_JOBENTRY, R_JOBENTRY_ATTRIBUTE).","Re-save/recreate the job entry in Spoon to rewrite its repository attributes.","Inspect the chained cause (dbe) for the underlying SQL error and fix the schema/driver mismatch."],"exampleFix":"// before\nJobEntrySimpleEval entry = new JobEntrySimpleEval();\nentry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers); // throws if repo read fails\n// after\ntry {\n  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"Failed to load JobEntrySimpleEval id=\" + idJobEntry + \": \" + e.getCause(), e);\n}","handlingStrategy":"try-catch","validationCode":"if (!rep.connect().equals(...)) { /* test repository connectivity before load */ }","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n} catch (KettleException e) {\n  logger.error(\"JobEntrySimpleEval load failed for id=\" + idJobEntry, e);\n  // fall back to defaults or abort job load\n}","preventionTips":["Test the repository connection before opening jobs.","Avoid direct DB edits to repository tables.","Keep repository schema at the version matching your Pentaho release.","Catch the chained cause to distinguish connectivity vs corruption."],"tags":["kettle","repository","persistence","job-entry"],"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"}