Search code examples
talend

tFTPConnection setting password from context not working


I'm trying to set password of tFTPConnection component of Talend Open Studio using the context variable, but it's not working.

I'm getting this exception:

I've tried both reading context from file using context load and using context directly in the job


Exception in component tFTPConnection_1 (read_file_from_sftp_using_context)
com.jcraft.jsch.JSchException: Auth cancel
    at com.jcraft.jsch.Session.connect(Session.java:511)
    at com.jcraft.jsch.Session.connect(Session.java:183)
    at local_project.read_file_from_sftp_using_context_0_1.read_file_from_sftp_using_context.tFTPConnection_1Process(read_file_from_sftp_using_context.java:2062)
    at local_project.read_file_from_sftp_using_context_0_1.read_file_from_sftp_using_context.tFileInputDelimited_3Process(read_file_from_sftp_using_context.java:1776)
    at local_project.read_file_from_sftp_using_context_0_1.read_file_from_sftp_using_context.tFileInputDelimited_2Process(read_file_from_sftp_using_context.java:1067)
    at local_project.read_file_from_sftp_using_context_0_1.read_file_from_sftp_using_context.runJobInTOS(read_file_from_sftp_using_context.java:2550)
    at local_project.read_file_from_sftp_using_context_0_1.read_file_from_sftp_using_context.main(read_file_from_sftp_using_context.java:2345)
[statistics] disconnected

I expected that my connection will work but :(


Solution

  • I found the solution to the passing of password which contained special character semicolon(;). I was reading this, and found this statement:

    Note the quotation marks around "noDatetimeStringSync=true" as it contains a Field Separator = character.

    I tried that with the semicolon and it worked for me.

    Thanks @Mo2s for your support as well.

    Cheers, Ram