{"record":{"id":"ee5d2854a44816f0","repo":"pentaho/pentaho-kettle","slug":"jobevalfilesmetrics-error-exception-unablesaverep","errorCode":null,"errorMessage":"JobEvalFilesMetrics.Error.Exception.UnableSaveRep","messagePattern":"JobEvalFilesMetrics\\.Error\\.Exception\\.UnableSaveRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/evalfilesmetrics/JobEntryEvalFilesMetrics.java","lineNumber":337,"sourceCode":"        }\n      }\n\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"result_filenames_wildcard\", resultFilenamesWildcard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"result_field_file\", ResultFieldFile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"result_field_wild\", ResultFieldWildcard );\n      rep.saveJobEntryAttribute(\n        id_job, getObjectId(), \"result_field_includesubfolders\", ResultFieldIncludesubFolders );\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( id_job, getObjectId(), \"successnumbercondition\", JobEntrySimpleEval\n        .getSuccessNumberConditionCode( successConditionType ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"scale\", getScaleCode( scale ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"source_files\", getSourceFilesCode( sourceFiles ) );\n      rep\n        .saveJobEntryAttribute( id_job, getObjectId(), \"evaluation_type\", getEvaluationTypeCode( evaluationType ) );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEvalFilesMetrics.Error.Exception.UnableSaveRep\" )\n        + id_job, dbe );\n    }\n  }\n\n  public Result execute( Result previousResult, int nr ) throws KettleException {\n    Result result = previousResult;\n    result.setNrErrors( 1 );\n    result.setResult( false );\n\n    List<RowMetaAndData> rows = result.getRows();\n    RowMetaAndData resultRow = null;\n\n    //Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS\n    if ( parentJobMeta.getNamedClusterEmbedManager() != null ) {\n      parentJobMeta.getNamedClusterEmbedManager()\n        .passEmbeddedMetastoreKey( this, parentJobMeta.getEmbeddedMetastoreProviderKey() );\n    }\n","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/evalfilesmetrics/JobEntryEvalFilesMetrics.java#L319-L355","documentation":"JobEntryEvalFilesMetrics.saveRep() persists this entry's settings (successcondition, scale, source_files, evaluation_type, etc.) to the repository; a KettleDatabaseException is rethrown as a KettleException with localized message 'JobEvalFilesMetrics.Error.Exception.UnableSaveRep' plus the job id. Saving the job aborts because this entry's attributes could not be written.","triggerScenarios":"Saving a job to a repository where any rep.saveJobEntryAttribute(...) call inside the try block throws KettleDatabaseException.","commonSituations":"Read-only or full repository database; connection dropped mid-save; null ObjectId for the entry; attribute column size exceeded; repository schema not migrated.","solutions":["Read the chained KettleDatabaseException for the exact SQL failure.","Ensure the repository DB is writable, reachable, and has space; check for lock/timeout errors.","Confirm the job and entry have valid ObjectIds (save assigns them) and that the repository schema is current.","Retry the save once connectivity is restored."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (jobMeta.getObjectId() == null) {\n  throw new IllegalStateException(\"Assign job id before saving\");\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(\"Save of EvalFilesMetrics attributes failed: \" + e.getMessage(), e);\n  }\n  throw e;\n}","preventionTips":["Confirm DB write permissions and quota before bulk job saves.","Keep the repository schema current with the client version.","Handle transient DB outages with save retries.","Avoid concurrent saves of the same job to reduce lock conflicts."],"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"}