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

One Star

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.

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
One Star

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

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.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog