{"record":{"id":"416ba45bf80bc4a1","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-ftp-to-the-repository-for-416ba4","errorCode":null,"errorMessage":"Unable to save job entry of type 'ftp' to the repository for id_job={}","messagePattern":"Unable to save job entry of type 'ftp' to the repository for id_job=(.+?)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/hl7/core/src/main/java/org/pentaho/di/job/entries/hl7mllpin/HL7MLLPInput.java","lineNumber":136,"sourceCode":"      server = rep.getJobEntryAttributeString( idJobentry, \"server\" );\n      port = rep.getJobEntryAttributeString( idJobentry, \"port\" );\n      messageVariableName = rep.getJobEntryAttributeString( idJobentry, \"message_variable\" );\n      messageTypeVariableName = rep.getJobEntryAttributeString( idJobentry, \"type_variable\" );\n      versionVariableName = rep.getJobEntryAttributeString( idJobentry, \"version_variable\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException( \"Unable to load job entry from the repository for id_jobentry=\" + idJobentry, 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(), \"server\", server );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"port\", port );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"message_variable\", messageVariableName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"type_variable\", messageTypeVariableName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"version_variable\", versionVariableName );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save job entry of type 'ftp' to the repository for id_job=\" + id_job, dbe );\n    }\n  }\n\n  public Result execute( Result previousResult, int nr ) {\n    Result result = previousResult;\n\n    try {\n\n      String serverName = environmentSubstitute( server );\n      int portNumber = Integer.parseInt( environmentSubstitute( port ) );\n      String messageVariable = environmentSubstitute( messageVariableName );\n      String messageTypeVariable = environmentSubstitute( messageTypeVariableName );\n      String versionVariable = environmentSubstitute( versionVariableName );\n\n      MLLPSocketCacheEntry entry = MLLPSocketCache.getInstance().getServerSocketStreamSource( serverName, portNumber );\n      if ( entry.getJobListener() != null ) {\n        parentJob.addJobListener( entry.getJobListener() );\n      }","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/hl7/core/src/main/java/org/pentaho/di/job/entries/hl7mllpin/HL7MLLPInput.java#L118-L154","documentation":"This KettleException is thrown by HL7MLLPInput.saveRep() when one of the rep.saveJobEntryAttribute() calls fails while persisting this HL7 MLLP Input job entry's configuration (server, port, and variable names) to the Kettle repository. The underlying KettleDatabaseException is wrapped and rethrown with the job entry type and id_job for context. The 'ftp' text is a copy-paste artifact from another job entry and does not indicate FTP is involved.","triggerScenarios":"saveRep() is invoked (e.g. saving a job in Spoon) and the repository database throws a KettleDatabaseException while writing any of the server/port/message_variable/type_variable/version_version_variable attributes — e.g. repository connection lost, table missing/corrupt, or id_job no longer valid.","commonSituations":"Repository database is down or network to it dropped mid-save; r_jobentry_attribute table schema mismatch after a Kettle upgrade; stale/deleted id_job reference; repository metadata cache out of sync.","solutions":["Verify the repository database connection is alive and retry the save","Check the r_jobentry_attribute table exists and has the expected schema for this Kettle version","Re-open the job and re-save to refresh the id_job reference","Check repository DB logs for the wrapped KettleDatabaseException cause for the exact SQL failure"],"exampleFix":"// before\nthrow new KettleException( \"Unable to save job entry of type 'ftp' to the repository for id_job=\" + id_job, dbe );\n// after\nthrow new KettleException( \"Unable to save job entry of type 'HL7 MLLP Input' to the repository for id_job=\" + id_job, dbe );","handlingStrategy":"try-catch","validationCode":"if (jobEntry.getObjectId() == null || rep == null) { throw new IllegalStateException(\"Job entry not persisted yet; cannot saveRep\"); }","typeGuard":null,"tryCatchPattern":"try { jobEntry.saveRep(rep, metaStore, id_job); } catch (KettleException e) { logError(\"Repository save failed for id_job=\" + id_job, e); throw e; }","preventionTips":["Keep the repository connection healthy before bulk job saves","Monitor repository DB connectivity; retry saves on transient failures","Keep r_jobentry_attribute schema in sync with the Kettle version","Note the misleading 'ftp' text — always read the wrapped cause for the real error"],"tags":["kettle","repository","database","job-entry","hl7"],"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"}