{"record":{"id":"1f07a59f8cbeeb5b","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-shell-to-the-repository","errorCode":null,"errorMessage":"Unable to save job entry of type 'shell' to the repository","messagePattern":"Unable to save job entry of type 'shell' to the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/shell/JobEntryShell.java","lineNumber":248,"sourceCode":"      rep.saveJobEntryAttribute( id_job, getObjectId(), \"set_logfile\", setLogfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"set_append_logfile\", setAppendLogfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_date\", addDate );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_time\", addTime );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"logfile\", logfile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"logext\", logext );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"loglevel\", logFileLevel == null ? LogLevel.NOTHING\n        .getCode() : logFileLevel.getCode() );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"insertScript\", insertScript );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"script\", script );\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, \"argument\", arguments[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save job entry of type 'shell' to the repository\", dbe );\n    }\n  }\n\n  public void clear() {\n    super.clear();\n\n    filename = null;\n    workDirectory = null;\n    arguments = null;\n    argFromPrevious = false;\n    addDate = false;\n    addTime = false;\n    logfile = null;\n    logext = null;\n    setLogfile = false;\n    execPerRow = false;\n    setAppendLogfile = false;\n    insertScript = false;","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/shell/JobEntryShell.java#L230-L266","documentation":"JobEntryShell.saveRep persists the job entry to the repository; a KettleDatabaseException while saving attributes (including each argument row via saveJobEntryAttribute) is wrapped in KettleException('Unable to save job entry of type 'shell' to the repository'). The job is not saved and the transaction typically rolls back.","triggerScenarios":"rep.saveJobEntryAttribute(id_job, objectId, i, 'argument', arguments[i]) throws — repository DB unreachable, table lock/timeout, column size exceeded by a long argument, or constraint violation.","commonSituations":"Repository database down or credentials expired while saving a job in Spoon; argument string longer than the VALUE column size; database in read-only mode; deadlock/timeout under concurrent saves.","solutions":["Check the nested KettleDatabaseException for the underlying SQL error","Verify repository DB connectivity, credentials, and that it is not read-only","Shorten oversized arguments (or widen the repository VALUE column)","Retry the save; resolve locks/timeouts if the DB was under load"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  jobEntryShell.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Repository save failed: \" + e.getCause().getMessage(), e);\n  // surface to user before the job window closes\n}","preventionTips":["Keep shell argument strings within the repository VALUE column size","Verify repository DB is writable and not in read-only mode","Check DB connection health before long Spoon sessions","Resolve locks/timeouts from concurrent saves before retrying"],"tags":["database","repository","job-entry","shell","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"}