{"record":{"id":"ee0bf4876fa30e14","repo":"pentaho/pentaho-kettle","slug":"jobentryevaltablecontent-unablesaverep","errorCode":null,"errorMessage":"JobEntryEvalTableContent.UnableSaveRep","messagePattern":"JobEntryEvalTableContent\\.UnableSaveRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/evaluatetablecontent/JobEntryEvalTableContent.java","lineNumber":266,"sourceCode":"    return 0;\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), \"connection\", \"id_database\", connection );\n\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"schemaname\", schemaname );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"tablename\", tablename );\n      rep.saveJobEntryAttribute(\n        id_job, getObjectId(), \"success_condition\", getSuccessConditionCode( successCondition ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"limit\", limit );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"custom_sql\", customSQL );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"is_custom_sql\", useCustomSQL );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"is_usevars\", useVars );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_rows_result\", addRowsResult );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"clear_result_rows\", clearResultList );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryEvalTableContent.UnableSaveRep\", \"\"\n        + id_job ), dbe );\n    }\n  }\n\n  public void setDatabase( DatabaseMeta database ) {\n    this.connection = database;\n  }\n\n  public DatabaseMeta getDatabase() {\n    return connection;\n  }\n\n  public boolean evaluates() {\n    return true;\n  }\n\n  public boolean isUnconditional() {\n    return false;","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/evaluatetablecontent/JobEntryEvalTableContent.java#L248-L284","documentation":"JobEntryEvalTableContent.saveRep() writes this entry's settings (custom_sql, is_custom_sql, is_usevars, add_rows_result, clear_result_rows) to the repository; a KettleDatabaseException is rethrown as a KettleException with localized message 'JobEntryEvalTableContent.UnableSaveRep' plus the job id. Saving the job fails at this entry's attribute persistence step.","triggerScenarios":"Saving a job to a repository where any rep.saveJobEntryAttribute(id_job, getObjectId(), ...) call inside the try block throws KettleDatabaseException.","commonSituations":"Repository database read-only, full, or disconnected mid-save; null ObjectId on the entry; column size exceeded by custom_sql; unmigrated repository schema.","solutions":["Inspect the chained KettleDatabaseException for the underlying SQL error.","Verify the repository DB is writable, reachable, and has adequate space; review r_jobentry_attribute column limits for custom_sql.","Ensure the entry has a valid ObjectId and the repository schema is up to date.","Retry the save after connectivity/permission issues are fixed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (jobMeta.getObjectId() == null) {\n  throw new IllegalStateException(\"Job needs an id before saveRep\");\n}\nif (!rep.connect()) {\n  throw new IllegalStateException(\"Repository not reachable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  jobMeta.save();\n} catch (KettleException e) {\n  if (e.getCause() instanceof KettleDatabaseException) {\n    logError(\"EvalTableContent save failed: \" + e.getMessage(), e);\n  }\n  throw e;\n}","preventionTips":["Ensure repository write access and sufficient DB space.","Keep custom_sql within column size limits.","Confirm valid ObjectIds before attribute writes.","Retry saves after transient database errors."],"tags":["database","repository","persistence","kettle"],"backgroundTag":"database-write-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"}