Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFTPConnection: The encoding can not be changed for this sftp server.

I uploaded from Talend 5.5 to Talend 5.6 and now my tFTPConnection is broken. It is pointed to the same FTP server and configured the same. If I run this job in Talend 5.5, it works as expected.
0683p000009MAxy.png
Here is the stack trace:
Exception in component tFTPConnection_1
4: The encoding can not be changed for this sftp server.
    at com.jcraft.jsch.ChannelSftp.setFilenameEncoding(ChannelSftp.java:2954)
    at talend56test.ftp56_0_1.FTP56.tFTPConnection_1Process(FTP56.java:411)
    at talend56test.ftp56_0_1.FTP56.runJobInTOS(FTP56.java:681)
    at talend56test.ftp56_0_1.FTP56.main(FTP56.java:520)
The Java line causing this error is:
c_tFTPConnection_1.setFilenameEncoding("ISO-8859-15");
How can I fix this?
Thanks and best regards,
Matthew
Labels (3)
1 Reply
Anonymous
Not applicable
Author

If I turn the encoding to UTF-8 instead of the default, it will work in Talend 5.6.
Checking the code for com.jcraft.jsch here:
2392   public void setFilenameEncoding(String encoding) throws SftpException{
2393   int sversion=getServerVersion();
2394   if(sversion > 3 &&
2395   !encoding.equals(UTF8)){
2396   throw new SftpException(SSH_FX_FAILURE,
2397   "The encoding can not be changed for this sftp server.");
2398   }
2399   if(encoding.equals(UTF8)){
2400   encoding=UTF8;
2401   }
2402   fEncoding=encoding;
2403   fEncoding_is_utf8=fEncoding.equals(UTF8);
2404   }
2405  
2406   public String getExtension(String key){
2407   if(extensions==null)
2408   return null;
2409   return (String)extensions.get(key);
2410   }
2411  
I would assume that this was a change to the setFilenameEncoding method that is in Talend 5.6, but not 5.5, that requires UTF8 if the SFTP server version if > 3.