{"record":{"id":"04bd5e92e525e72e","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-jobentry-of-type-file-exists-to-the-04bd5e","errorCode":null,"errorMessage":"unable to save jobentry of type 'file exists' to the repository for id_job=","messagePattern":"unable to save jobentry of type 'file exists' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/palo/core/src/main/java/org/pentaho/di/job/entries/palo/JobEntryCubeDelete/PaloCubeDelete.java","lineNumber":116,"sourceCode":"    try {\n      this.databaseMeta =\n          rep.loadDatabaseMetaFromJobEntryAttribute( id_jobentry, \"connection\", \"id_database\", databases );\n      this.setCubeName( rep.getStepAttributeString( id_jobentry, \"cubeName\" ) );\n\n    } catch ( KettleException dbe ) {\n      throw new KettleException( \"Unable to load job entry for type file exists from the repository for id_jobentry=\"\n          + id_jobentry, dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n\n      rep.saveDatabaseMetaJobEntryAttribute( id_job, getObjectId(), \"connection\", \"id_database\", databaseMeta );\n      rep.saveStepAttribute( id_job, getObjectId(), \"cubeName\", this.getCubeName() );\n\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n          \"unable to save jobentry of type 'file exists' to the repository for id_job=\" + id_job, dbe );\n    }\n  }\n\n  public Result execute( Result prevResult, int nr ) throws KettleException {\n\n    Result result = new Result( nr );\n    result.setResult( false );\n\n    logDetailed( toString(), \"Start of processing\" );\n\n    // String substitution..\n    String realCubeName = environmentSubstitute( getCubeName() );\n\n    PaloHelper database = new PaloHelper( this.getDatabaseMeta(), getLogLevel() );\n    try {\n      database.connect();\n      int cubesremoved = database.removeCube( realCubeName );","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/palo/core/src/main/java/org/pentaho/di/job/entries/palo/JobEntryCubeDelete/PaloCubeDelete.java#L98-L134","documentation":"Thrown by PaloCubeDelete.saveRep when persisting the job entry's settings (database connection and cube name) to the Kettle repository fails with a KettleDatabaseException. The message text ('file exists') is a copy-paste bug — the actual entry type is a Palo cube delete job entry. The underlying KettleDatabaseException is chained as the cause.","triggerScenarios":"Calling saveRep (during job save) when rep.saveDatabaseMetaJobEntryAttribute or rep.saveStepAttribute for 'cubeName' throws KettleDatabaseException, e.g. repository DB down, schema mismatch, or missing id_job/object id.","commonSituations":"Repository database unavailable or connection dropped mid-save; corrupt repository metadata tables; saving a job whose entry was never fully initialized (null ObjectId); repository permission problems.","solutions":["Check the chained KettleDatabaseException cause for the real repository failure (connectivity, schema, permissions).","Verify the Kettle repository is reachable and the user has write permissions on job entry attribute tables.","Re-save or recreate the job entry; verify getObjectId() is valid before saving.","Fix the copy-pasted message text to reference the Palo cube delete type for accurate diagnostics."],"exampleFix":"// before\nthrow new KettleException(\n  \"unable to save jobentry of type 'file exists' to the repository for id_job=\" + id_job, dbe );\n// after\nthrow new KettleException(\n  \"unable to save jobentry of type 'palo cube delete' to the repository for id_job=\" + id_job, dbe );","handlingStrategy":"try-catch","validationCode":"if (jobEntry.getObjectId() == null || id_job < 0) { throw new IllegalStateException(\"job entry not initialized before save\"); }","typeGuard":null,"tryCatchPattern":"try { jobMeta.saveRep(...) } catch (KettleException e) { log.error(\"repository save failed\", e.getCause()); /* retry or surface to user */ }","preventionTips":["Keep the repository database healthy and reachable before saving jobs","Always check the chained cause of KettleException for the true repository error","Initialize job entries (valid ObjectId) before saving"],"tags":["kettle","repository","persistence","palo"],"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"}