Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
class it.sauronsoftware.ftp4j.FTPClient
javax.net.ssl.SSLContext sslContext = null;
javax.net.ssl.TrustManager[] trustManager = null;
javax.net.ssl.SSLSocketFactory sslSocketFactory = null;
it.sauronsoftware.ftp4j.FTPClient ftp_tFTPConnection_2 = null;
MyTrust_tFTPConnection_2 myTrust_tFTPConnection_2 = null;
try {
try {
System.out.println("Conn start");
sslContext = javax.net.ssl.SSLContext.getInstance("SSL");
myTrust_tFTPConnection_2 = new MyTrust_tFTPConnection_2();
trustManager = myTrust_tFTPConnection_2.getTrustManagers();
sslContext.init(null, trustManager,
new java.security.SecureRandom());
sslSocketFactory = sslContext.getSocketFactory();
System.out.println("Conn socket start");
ftp_tFTPConnection_2 = new it.sauronsoftware.ftp4j.FTPClient();
ftp_tFTPConnection_2.setSSLSocketFactory(sslSocketFactory);
//not working
// ftp_tFTPConnection_2.setSecurity(it.sauronsoftware.ftp4j.FTPClient.SECURITY_FTPES);
//working
ftp_tFTPConnection_2.setSecurity(it.sauronsoftware.ftp4j.FTPClient.SECURITY_FTPS);
System.out.println("Conn start ... init");
ftp_tFTPConnection_2.setSecurity(it.sauronsoftware.ftp4j.FTPClient.SECURITY_FTPS);
ftp_tFTPConnection_2.setSecurity(it.sauronsoftware.ftp4j.FTPClient.SECURITY_FTPES);
I think SFTP is not the solution here as far as this is SSH File Transfer Protocol if they do not have SSH daemon running on the destination. What is dvojnik talking about is FTPS.
You can modify the tFTPConnection component to generate the correct code. look in <talend_install>\plugins\org.talend.designer.components.localprovider_<version#>\components
I would suggest copying the tFTPConnection and making a whole "new" component rather than just editing the existing one.
Exception in component tFTPPut_1
java.lang.ClassCastException: it.sauronsoftware.ftp4j.FTPClient cannot be cast to com.enterprisedt.net.ftp.FTPClient
at talenddemosjava.testftps_0_1.testFTPS.tFTPPut_1Process(testFTPS.java:385)
at talenddemosjava.testftps_0_1.testFTPS.tFTPConnection_1Process(testFTPS.java:325)
at talenddemosjava.testftps_0_1.testFTPS.runJobInTOS(testFTPS.java:786)
at talenddemosjava.testftps_0_1.testFTPS.main(testFTPS.java:657)