{"record":{"id":"54b76a06b0114888","repo":"pentaho/pentaho-kettle","slug":"jobentryeval-unabletoloadfromrepo","errorCode":null,"errorMessage":"JobEntryEval.UnableToLoadFromRepo","messagePattern":"JobEntryEval\\.UnableToLoadFromRepo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/eval/JobEntryEval.java","lineNumber":94,"sourceCode":"    return retval.toString();\n  }\n\n  public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,\n    Repository rep, IMetaStore metaStore ) throws KettleXMLException {\n    try {\n      super.loadXML( entrynode, databases, slaveServers );\n      script = XMLHandler.getTagValue( entrynode, \"script\" );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"JobEntryEval.UnableToLoadFromXml\" ), e );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      script = rep.getJobEntryAttributeString( id_jobentry, \"script\" );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryEval.UnableToLoadFromRepo\", String\n        .valueOf( id_jobentry ) ), dbe );\n    }\n  }\n\n  // Save the attributes of this job entry\n  //\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"script\", script );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryEval.UnableToSaveToRepo\", String\n        .valueOf( id_job ) ), dbe );\n    }\n  }\n\n  public void setScript( String s ) {\n    script = s;\n  }","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/eval/JobEntryEval.java#L76-L112","documentation":"JobEntryEval.loadRep() reads the 'script' attribute for this job entry from the Kettle repository; a KettleDatabaseException is rethrown as a KettleException with localized message 'JobEntryEval.UnableToLoadFromRepo' plus the job entry id. It means the Eval job entry's stored definition could not be loaded from the repository database.","triggerScenarios":"Loading a job from a repository (loadJobFromRepository) where rep.getJobEntryAttributeString(id_jobentry, \"script\") throws KettleDatabaseException, e.g. the r_jobentry_attribute row is missing or the DB is unreachable.","commonSituations":"Repository database down or network blip; missing rows in r_jobentry_attribute after a failed migration; wrong repository credentials; repository schema version mismatch between client and server.","solutions":["Check the cause KettleDatabaseException for the JDBC error (connectivity, credentials, lock).","Verify the job entry row exists in r_jobentry_attribute for the reported id_jobentry.","Test the repository connection in Spoon and repair/upgrade the repository schema if versions differ.","Re-save the job entry from a working client to recreate missing attributes."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify repository connectivity before loading\nif (!rep.connect()) {\n  throw new IllegalStateException(\"Repository not reachable: \" + rep.getName());\n}","typeGuard":null,"tryCatchPattern":"try {\n  JobMeta meta = rep.loadJob(jobName, jobDir, null, null);\n} catch (KettleException e) {\n  if (e.getCause() instanceof KettleDatabaseException) {\n    logError(\"Repository DB failure loading Eval entry \" + e.getMessage(), e);\n  }\n  throw e;\n}","preventionTips":["Test repository connections before running loads.","Keep repository schema versions in sync with clients via upgrade scripts.","Back up r_jobentry_attribute and monitor for missing rows after migrations.","Use connection pooling/health checks to avoid transient DB drops."],"tags":["database","repository","job-entry","kettle"],"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"}