{"record":{"id":"21e45c3be2c1a1e2","repo":"pentaho/pentaho-kettle","slug":"jobftpsput-unabletoloadfromrepo","errorCode":"JobFTPSPUT.UnableToLoadFromRepo","errorMessage":"JobFTPSPUT.UnableToLoadFromRepo","messagePattern":"JobFTPSPUT\\.UnableToLoadFromRepo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsput/JobEntryFTPSPUT.java","lineNumber":192,"sourceCode":"        Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, \"password\" ) );\n      remoteDirectory = rep.getJobEntryAttributeString( id_jobentry, \"remoteDirectory\" );\n      localDirectory = rep.getJobEntryAttributeString( id_jobentry, \"localDirectory\" );\n      wildcard = rep.getJobEntryAttributeString( id_jobentry, \"wildcard\" );\n      binaryMode = rep.getJobEntryAttributeBoolean( id_jobentry, \"binary\" );\n      timeout = rep.getJobEntryAttributeString( id_jobentry, \"timeout\" );\n      remove = rep.getJobEntryAttributeBoolean( id_jobentry, \"remove\" );\n      onlyPuttingNewFiles = rep.getJobEntryAttributeBoolean( id_jobentry, \"only_new\" );\n      activeConnection = rep.getJobEntryAttributeBoolean( id_jobentry, \"active\" );\n\n      proxyHost = rep.getJobEntryAttributeString( id_jobentry, \"proxy_host\" );\n      proxyPort = rep.getJobEntryAttributeString( id_jobentry, \"proxy_port\" );\n      proxyUsername = rep.getJobEntryAttributeString( id_jobentry, \"proxy_username\" );\n      proxyPassword = rep.getJobEntryAttributeString( id_jobentry, \"proxy_password\" );\n      connectionType =\n        FTPSConnection.getConnectionTypeByCode( Const.NVL( rep.getJobEntryAttributeString(\n          id_jobentry, \"connection_type\" ), \"\" ) );\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPSPUT.UnableToLoadFromRepo\", String\n        .valueOf( 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(), \"servername\", serverName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"serverport\", serverPort );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"username\", userName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"password\", Encr\n        .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 );","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsput/JobEntryFTPSPUT.java#L174-L210","documentation":"JobEntryFTPSPUT.loadRep() throws this KettleException when reading the job entry's attributes from the Kettle repository fails. Any KettleException from rep.getJobEntryAttributeString(...) or from FTPSConnection.getConnectionTypeByCode (invalid stored connection_type) is rethrown with the JobFTPSPUT.UnableToLoadFromRepo message plus the id_jobentry, with the database exception as cause.","triggerScenarios":"Loading an FTPSput job entry by ObjectId from a repository where the r_jobentry_attribute rows are missing/corrupt, the repository connection fails mid-read, or the stored connection_type string is not a recognized FTPS connection code.","commonSituations":"Repository schema drift after upgrading Pentaho; rows deleted from r_jobentry_attribute; repository database connectivity problems; entries saved by a newer plugin version with connection types the current code doesn't know.","solutions":["Read the cause (KettleException/KettleDatabaseException) and verify repository connectivity and credentials.","Check r_jobentry_attribute rows for the given id_jobentry and repair or delete the broken entry, then recreate it in Spoon.","Confirm the stored connection_type matches a valid FTPSConnection code for the installed plugin version.","Re-save the job entry with a matching plugin version so attributes are written in the expected format."],"exampleFix":"// before: blindly loading with a stale ObjectId\nJobEntryFTPSPUT entry = new JobEntryFTPSPUT();\nentry.loadRep( rep, metaStore, unknownId, databases, slaveServers );\n// after: verify the entry exists first\nRowMetaAndData row = rep.getJobEntry( id_jobentry );\nif ( row == null ) throw new KettleException( \"Job entry \" + id_jobentry + \" missing from repository\" );\nentry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );","handlingStrategy":"try-catch","validationCode":"// verify the entry exists and repository is reachable before loadRep\nif ( !rep.isConnected() || rep.getJobEntry( id_jobentry ) == null ) {\n  throw new KettleException( \"Cannot load FTPSPUT entry \" + id_jobentry + \": repository/entry unavailable\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );\n} catch ( KettleException e ) {\n  log.error( \"Repo load failed for FTPSPUT entry \" + id_jobentry + \": \" + e.getCause() );\n  throw new KettleException( \"Check repository connectivity and r_jobentry_attribute rows, then reload\", e );\n}","preventionTips":["Test the repository connection before loading jobs.","Never delete r_jobentry_attribute rows manually; use Spoon to remove entries.","Run repository upgrade scripts after Pentaho version changes.","Confirm plugin versions match between save-time and load-time."],"tags":["kettle","repository","database","ftps"],"backgroundTag":"database-query-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"}