java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPException

Highlighted
One Star

Re: java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPException

it looks helpful
Highlighted
Two Stars

Re: java.lang.NoClassDefFoundError: com/enterprisedt/net/ftp/FTPException

Hello,

 

Anyone have solved this problem ?

I have exactly the same problem.

 In Talend Open Studio For Data Integration Version : 6.1.1,

I made a little test job to isolate my pb

  • A tFTPConnexion wich initiate the connexion in FTP/S
    Connexion is Ok, I use .jks wich contains the .pem file used to connect our FTP/S server
  • A tFTPList using the Connexion
    => A this time, the job doesn't compile : Error encountered : ( in the code extract below, in red ) : 
    com.enterprisedt.net cannot be resolved to a type
    Anyone kwows if this problem was resolved in upper version of Talend Integration Studio ?
    If any, do you know if there is a workaround for 6.1.1 version for this bug ?
    	public void tFTPFileList_1Process(
    			final java.util.Map<String, Object> globalMap)
    			throws TalendException {
    		globalMap.put("tFTPFileList_1_SUBPROCESS_STATE", 0);
    
    		final boolean execStat = this.execStat;
    
    		String iterateId = "";
    
    		String currentComponent = "";
    		java.util.Map<String, Object> resourceMap = new java.util.HashMap<String, Object>();
    
    		try {
    
    			String currentMethodName = new java.lang.Exception()
    					.getStackTrace()[0].getMethodName();
    			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
    			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
    																					// the
    																					// resume
    				globalResumeTicket = true;
    
    				/**
    				 * [tFTPFileList_1 begin ] start
    				 */
    
    				ok_Hash.put("tFTPFileList_1", false);
    				start_Hash.put("tFTPFileList_1", System.currentTimeMillis());
    
    				currentComponent = "tFTPFileList_1";
    
    				int tos_count_tFTPFileList_1 = 0;
    
    				java.util.List<String> maskList_tFTPFileList_1 = new java.util.ArrayList<String>();
    
    				maskList_tFTPFileList_1.add("*");
    				int nb_file_tFTPFileList_1 = 0;
    				com.enterprisedt.net.ftp.FTPClient ftp_tFTPFileList_1 = null;
    				ftp_tFTPFileList_1 = (com.enterprisedt.net.ftp.FTPClient) globalMap
    						.get("conn_tFTPConnection_1");
    
    				String remotedir_tFTPFileList_1 = "/Import/Test";
    				ftp_tFTPFileList_1.chdir(remotedir_tFTPFileList_1);
    				String[] fileList_tFTPFileList_1;
    
    				if (false) {
    					fileList_tFTPFileList_1 = ftp_tFTPFileList_1
    							.dir(null, true);
    				} else {
    					fileList_tFTPFileList_1 = ftp_tFTPFileList_1.dir(null,
    							false);
    				}
    				List<String> fileListTemp_tFTPFileList_1 = new java.util.ArrayList<String>();
    
    				for (String filemask_tFTPFileList_1 : maskList_tFTPFileList_1) {
    					java.util.regex.Pattern fileNamePattern_tFTPFileList_1 = java.util.regex.Pattern
    							.compile(filemask_tFTPFileList_1.replaceAll("\\.",
    									"\\\\.").replaceAll("\\*", ".*"));
    
    					for (String filemaskTemp_tFTPFileList_1 : fileList_tFTPFileList_1) {
    						if (fileNamePattern_tFTPFileList_1.matcher(
    								filemaskTemp_tFTPFileList_1).matches()) {
    							fileListTemp_tFTPFileList_1
    									.add(filemaskTemp_tFTPFileList_1);
    						}
    					}
    				}
    				int i_tFTPFileList_1 = -1;
    
    				while (++i_tFTPFileList_1 < fileListTemp_tFTPFileList_1.size()) {
    					String currentFileName_tFTPFileList_1 = fileListTemp_tFTPFileList_1
    							.get(i_tFTPFileList_1);
    					String currentFilePath_tFTPFileList_1 = remotedir_tFTPFileList_1
    							+ "/"
    							+ fileListTemp_tFTPFileList_1.get(i_tFTPFileList_1);
    
    					globalMap.put("tFTPFileList_1_CURRENT_FILE",
    							currentFileName_tFTPFileList_1);
    					globalMap.put("tFTPFileList_1_CURRENT_FILEPATH",
    							currentFilePath_tFTPFileList_1);
    					nb_file_tFTPFileList_1++;
    
    					/**
    					 * [tFTPFileList_1 begin ] stop
    					 */
    
    					/**
    					 * [tFTPFileList_1 main ] start
    					 */
    
    					currentComponent = "tFTPFileList_1";
    
    					tos_count_tFTPFileList_1++;
    
    					/**
    					 * [tFTPFileList_1 main ] stop
    					 */
    
    					/**
    					 * [tFTPFileList_1 end ] start
    					 */
    
    					currentComponent = "tFTPFileList_1";
    
    				}
    				globalMap.put("tFTPFileList_1_NB_FILE", nb_file_tFTPFileList_1);
    
    				ok_Hash.put("tFTPFileList_1", true);
    				end_Hash.put("tFTPFileList_1", System.currentTimeMillis());
    
    				/**
    				 * [tFTPFileList_1 end ] stop
    				 */
    			}// end the resume
    
    		} catch (java.lang.Exception e) {
    
    			TalendException te = new TalendException(e, currentComponent,
    					globalMap);
    
    			throw te;
    		} catch (java.lang.Error error) {
    
    			runStat.stopThreadStat();
    
    			throw error;
    		} finally {
    
    			try {
    
    				/**
    				 * [tFTPFileList_1 finally ] start
    				 */
    
    				currentComponent = "tFTPFileList_1";
    
    				/**
    				 * [tFTPFileList_1 finally ] stop
    				 */
    			} catch (java.lang.Exception e) {
    				// ignore
    			} catch (java.lang.Error error) {
    				// ignore
    			}
    			resourceMap = null;
    		}
    
    		globalMap.put("tFTPFileList_1_SUBPROCESS_STATE", 1);
    	}

 

 

 

 

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog