{"record":{"id":"4e789f77eba5aac4","repo":"pentaho/pentaho-kettle","slug":"jobentrycolumnsexist-meta-unablesaverep","errorCode":null,"errorMessage":"JobEntryColumnsExist.Meta.UnableSaveRep","messagePattern":"JobEntryColumnsExist\\.Meta\\.UnableSaveRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/columnsexist/JobEntryColumnsExist.java","lineNumber":173,"sourceCode":"        + id_jobentry ), dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"tablename\", tablename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"schemaname\", schemaname );\n\n      rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), \"connection\", \"id_database\", connection );\n\n      // save the arguments...\n      if ( arguments != null ) {\n        for ( int i = 0; i < arguments.length; i++ ) {\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"name\", arguments[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryColumnsExist.Meta.UnableSaveRep\", \"\"\n        + id_job ), dbe );\n    }\n  }\n\n  public void setTablename( String tablename ) {\n    this.tablename = tablename;\n  }\n\n  public String getTablename() {\n    return tablename;\n  }\n\n  public void setSchemaname( String schemaname ) {\n    this.schemaname = schemaname;\n  }\n\n  public String getSchemaname() {\n    return schemaname;","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/columnsexist/JobEntryColumnsExist.java#L155-L191","documentation":"JobEntryColumnsExist.saveRep wraps any KettleDatabaseException raised while persisting the entry's field-name list to the repository (per-row saveJobEntryAttribute calls) into this KettleException, identifying the job by id_job.","triggerScenarios":"Calling saveRep when the repository write of the 'name' attributes fails — DB outage, constraint violation, read-only repository, dropped connection.","commonSituations":"Repository database full or read-only; network interruption during save; schema drift after PDI upgrade; leftover rows from an earlier failed save causing conflicts.","solutions":["Read the chained KettleDatabaseException to identify the SQL failure","Verify DB connectivity, write access and disk space on the repository","Delete stale r_jobentry_attribute rows for the entry and save again","Run repository schema upgrade scripts if versions differ"],"exampleFix":"// before\nentry.saveRep(rep, metaStore, idJob); // silently failing DB, retried forever\n// after\ntry {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  log.error(\"Unable to save columns-exist entry for job \" + idJob, e.getCause());\n  // fix repository, then retry once\n}","handlingStrategy":"try-catch","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");\nif (id_job == null) throw new IllegalStateException(\"Job not yet saved; no id_job\");","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, id_job);\n} catch (KettleException e) {\n  log.error(\"Repo save failed for job \" + id_job + \": \" + e.getCause(), e);\n}","preventionTips":["Save the JobMeta first so a valid id_job exists before saving entries","Ensure repository DB has space and write permissions","Retry once on transient KettleDatabaseException, then surface the cause"],"tags":["repository","database","job-entry","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"}