{"record":{"id":"19d4161cb67a95e8","repo":"pentaho/pentaho-kettle","slug":"jobftpsput-log-unabletoloadfromxml","errorCode":"JobFTPSPUT.Log.UnableToLoadFromXml","errorMessage":"JobFTPSPUT.Log.UnableToLoadFromXml","messagePattern":"JobFTPSPUT\\.Log\\.UnableToLoadFromXml","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsput/JobEntryFTPSPUT.java","lineNumber":163,"sourceCode":"      password = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( entrynode, \"password\" ) );\n      remoteDirectory = XMLHandler.getTagValue( entrynode, \"remoteDirectory\" );\n      localDirectory = XMLHandler.getTagValue( entrynode, \"localDirectory\" );\n      wildcard = XMLHandler.getTagValue( entrynode, \"wildcard\" );\n      binaryMode = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"binary\" ) );\n      timeout = XMLHandler.getTagValue( entrynode, \"timeout\" );\n      remove = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"remove\" ) );\n      onlyPuttingNewFiles = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"only_new\" ) );\n      activeConnection = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"active\" ) );\n\n      proxyHost = XMLHandler.getTagValue( entrynode, \"proxy_host\" );\n      proxyPort = XMLHandler.getTagValue( entrynode, \"proxy_port\" );\n      proxyUsername = XMLHandler.getTagValue( entrynode, \"proxy_username\" );\n      proxyPassword = XMLHandler.getTagValue( entrynode, \"proxy_password\" );\n      connectionType =\n        FTPSConnection.getConnectionTypeByCode( Const.NVL(\n          XMLHandler.getTagValue( entrynode, \"connection_type\" ), \"\" ) );\n    } catch ( KettleXMLException xe ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"JobFTPSPUT.Log.UnableToLoadFromXml\" ), xe );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      serverName = rep.getJobEntryAttributeString( id_jobentry, \"servername\" );\n      serverPort = rep.getJobEntryAttributeString( id_jobentry, \"serverport\" );\n      userName = rep.getJobEntryAttributeString( id_jobentry, \"username\" );\n      password =\n        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\" );","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsput/JobEntryFTPSPUT.java#L145-L181","documentation":"JobEntryFTPSPUT.loadXML() wraps any KettleXMLException raised while parsing the job entry's XML node in a new KettleXMLException with the JobFTPSPUT.Log.UnableToLoadFromXml message. It indicates the <entry type='FTPSPUT'> element could not be deserialized — a required tag was missing/malformed or the connection_type code was invalid — and the original parse exception is attached as the cause.","triggerScenarios":"Loading a .kjb job file whose FTPSput entry XML is hand-edited or produced by an older/newer plugin version, so XMLHandler.getTagValue returns unexpected values or FTPSConnection.getConnectionTypeByCode receives an unknown connection_type code and throws.","commonSituations":"Manually editing or generating job XML; migrating jobs between Kettle versions where the FTPS plugin schema changed; corrupted/truncated .kjb files; a connection_type attribute that doesn't match any FTPSConnection type code.","solutions":["Inspect the cause (getCause()) to find the exact failing tag, then fix the XML attribute in the .kjb file.","Re-open and re-save the job entry in Spoon so it regenerates valid XML for the installed plugin version.","Verify the connection_type value matches a valid FTPSConnection code (e.g., as accepted by getConnectionTypeByCode).","Ensure the FTPS plugin of the matching version is installed on the target Pentaho instance."],"exampleFix":"<!-- before -->\n<connection_type>FTPS_IMPLICIT_WRONG</connection_type>\n<!-- after: use a valid code -->\n<connection_type>FTPS_AUTH_SSL</connection_type>","handlingStrategy":"try-catch","validationCode":"// validate the FTPSPUT entry XML before loadXML\nString connType = XMLHandler.getTagValue( entrynode, \"connection_type\" );\nif ( connType != null && FTPSConnection.getConnectionTypeByCodeSafe( connType ) == null ) {\n  throw new IllegalArgumentException( \"Unknown FTPS connection_type: \" + connType );\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadXML( entrynode, databases, metaStore );\n} catch ( KettleXMLException e ) {\n  log.error( \"Failed to load FTPSPUT entry XML: \" + e.getMessage() + \"; cause=\" + e.getCause() );\n  throw new KettleException( \"Fix the FTPSput entry XML in the .kjb file and reload\", e );\n}","preventionTips":["Avoid hand-editing .kjb XML; edit entries through Spoon.","Keep plugin versions in sync between the instance that saves jobs and the one that loads them.","Validate connection_type codes against FTPSConnection constants before writing XML.","Keep job files under version control and validate after edits."],"tags":["kettle","xml","deserialization","ftps"],"backgroundTag":"xml-unmarshal-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"}