{"record":{"id":"ab73fdcd91ce7e4b","repo":"pentaho/pentaho-kettle","slug":"jobftpsput-unabletosavetorepo","errorCode":"JobFTPSPUT.UnableToSaveToRepo","errorMessage":"JobFTPSPUT.UnableToSaveToRepo","messagePattern":"JobFTPSPUT\\.UnableToSaveToRepo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsput/JobEntryFTPSPUT.java","lineNumber":221,"sourceCode":"        .encryptPasswordIfNotUsingVariables( password ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"remoteDirectory\", remoteDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"localDirectory\", localDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"wildcard\", wildcard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"binary\", binaryMode );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"timeout\", timeout );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"remove\", remove );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"only_new\", onlyPuttingNewFiles );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"active\", activeConnection );\n\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxy_host\", proxyHost );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxy_port\", proxyPort );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxy_username\", proxyUsername );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxy_password\", proxyPassword );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"connection_type\", FTPSConnection\n        .getConnectionType( connectionType ) );\n\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPSPUT.UnableToSaveToRepo\", String\n        .valueOf( id_job ) ), dbe );\n    }\n  }\n\n  /**\n   * @return Returns the binaryMode.\n   */\n  public boolean isBinaryMode() {\n    return binaryMode;\n  }\n\n  /**\n   * @param binaryMode\n   *          The binaryMode to set.\n   */\n  public void setBinaryMode( boolean binaryMode ) {\n    this.binaryMode = binaryMode;\n  }","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsput/JobEntryFTPSPUT.java#L203-L239","documentation":"JobEntryFTPSPUT.saveRep() throws this KettleException when persisting the entry's attributes (including connection_type) to the repository fails with a KettleDatabaseException. It is rethrown with the JobFTPSPUT.UnableToSaveToRepo message and the id_job identifier, with the database exception preserved as cause — typically a repository write/transaction problem rather than a config error.","triggerScenarios":"Calling saveRep() during job save when the repository connection is broken, the database is read-only or out of space, a constraint on r_jobentry_attribute is violated, or the transaction rolls back mid-save.","commonSituations":"Repository database down or networked DB dropped mid-save; user lacks INSERT/UPDATE rights on repository tables; database in read-only mode (maintenance, disk full); concurrent modification locking issues.","solutions":["Check the cause KettleDatabaseException for the SQL error and fix the repository database issue (connectivity, disk, locks).","Verify the repository user has write permission on r_jobentry_attribute.","Retry the save after confirming the repository is online; if corrupt, re-save the job from a fresh connection.","Test the repository connection in Spoon (Connect/Test) before saving large jobs."],"exampleFix":"// before: saving without checking repository availability\njobEntry.saveRep( rep, metaStore, id_job );\n// after: verify connection first\nif ( !rep.getConnection().equals( ... ) && !rep.testConnection() ) {\n  throw new KettleException( \"Repository unavailable\" );\n}\njobEntry.saveRep( rep, metaStore, id_job );","handlingStrategy":"try-catch","validationCode":"// check repository writability before saving\nif ( !rep.isConnected() ) throw new KettleException( \"Repository not connected\" );\n// optionally run: rep.testConnection(); or a cheap write probe","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep( rep, metaStore, id_job );\n} catch ( KettleException e ) {\n  Throwable c = e.getCause();\n  log.error( \"Repo save failed for FTPSPUT entry: \" + ( c != null ? c.getMessage() : e.getMessage() ) );\n  throw new KettleException( \"Fix repository DB issue (connection/privileges/space) and retry save\", e );\n}","preventionTips":["Test the repository connection before saving jobs.","Ensure the repository DB user has INSERT/UPDATE rights on job entry tables.","Monitor database disk space and read-only modes.","Avoid concurrent edits to the same job from multiple Spoon sessions."],"tags":["kettle","repository","database","write"],"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"}